A brief sharp pain in one spot of your head after sitting in a stretchy position is almost always a muscular or tension type pain, not something that reaches your baby. Your baby's heartbeat and growth depend on your blood flow and nutrition, which a passing head pain doesn't affect.
Next Steps
Rest, stay hydrated, and avoid holding stretched positions for long at this stage. If the pain repeats, worsens, or comes with vision changes, swelling or vomiting, mention it to your obstetrician at your next visit.
Health Tips
Go in sooner if the headache is severe, constant, or paired with blurred vision, since that needs same day review.