how can I stop a reoccurring foot pain that hurts.when on foot?

Maintain a healthy weight. Excess weight can be a factor, particularly if you are overweight, start an exercise program.

Wear loose, thin-soled shoes.

Use arch supports regularly that fit into your shoes or wearing shoes with built-in extra support may also be helpful. The shoes without enough arch support or flexible padding to absorb shock can increase strain on the plantar fascia.