Hello,
What you are telling looks like a vasovagal attack or postural blood pressure drop. Can be due to dehydration. Further workup depends upon your clinical profile like age , any other morbidities. For now, keep yourself well hydrated with high salt intake.
Next Steps
Consult online in case any help is needed