Who do I call “señorita” o “señora”?

I’m a guy in his mid-20s and I just called a Spanish woman, who is probably in her late 30s or early 40s, “señora”. Was that okay tho?

How old should a woman be to he called señora and how young should a girl be to be called señorita?