Have you sanded the whole thing and fix all the flaws first.
Paint does not cover flaws it makes them stick out.
Then it needs to be primed and painted two coats of flat ceiling paint.
If you prime and find more flaws, stop and fix them before painting. Any repairs will need to be primed before painting.
Usually popcorn has a very weak powdery mud that it is made of.
Sometimes painting right over that will fail because the paint is on a dusty surface.
I usually prime after removing popcorn with a thin clear primer called Gardz that will penetrate and seal that. Then very often requires a full skim of taping compound to make smooth, sand, reprime and then paint.
"It's better to come here with questions before you screw up than to come here after and ask how to fix them."- JS