Most likely the problem is Blossom End Rot. It is a Calcium deficiency.
Because you’re growing it in a pot, (hopefully with DRAINAGE _ if not, you’ve got other problems) nutrients are washed away with every watering, so it’s not getting what it needs to set healthy fruit.
Check a seed pack to see how much longer you have in your growing timeline to see if this is even worth your effort. If it is still enough time to get mature fruit, then start watering your potted squash with a few tablespoons of milk in the watering can when you water (each day? 2x a day when hot?) and see if that helps with the blossom end rot.
If you can find liquid bone meal (that can be mixed with water) you can use that, too.
Thank you.