How to handle anxious ‘what if ‘ thoughts

Helo coaches

I had a question on anxiety earlier and one of the suggestion was to answer every what if thought.But sometimes the what ifs are so irrational answering every thought creates more anxious what ifs .

What if I get head aches – take pain killer
What if it gets so bad – meet a doctor
What if doctor says there is problem etc …

How to handle these what ifs with appropriate answer ? Can you give me example ? Can I model these what if thoughts too ?