Try neck bridges.
From the back and front.
To get used to it, start by just trying to raise your body off the ground using your neck or put a towel on a wall and do the neck bridges like that.
Obviously use a towel or mat when you start with proper neck bridges.
It's harder when you keep your feet flat than when you're on your toes. At first just try to balance on the top of your head but when you get used to it and get more flexibilty then you'll be able to hold that position with you're forehead touching the mat.
Eventually it becomes more of a back exercise since your neck muscles get so used to it.
Also lie on the edge of a bench, put a towel across your forehead or behind your head, put a plate on top and then do some reps, pulling your chin towards your chest for the front. Then for the back straighten your neck and lower but don't hyper-extend when you straighten your neck.
It's best to start without weights till your neck gets used to it and then starting with light weights afterward..