How bad is the pain, like on a scale of 1 to 10?
Most often, headaches over eye like this are tension headaches - https://www.healthline.com/health/tension-headache
However, lasting that briefly, it might be a cluster headache, but that pain is terrible, and you don't mention that. https://www.allaboutvision.com/conditions/headache-behind-eyes/
It could be allergies or sinuses, but you definitely need to get it checked. I know things are crazy with COVID now, but if the pain gets worse, or the headaches change, see your doctor sooner.