My child is scared of being alone
Lots of times kids prefer to be around others especially when they have not had a lot of practice being alone. Just the same as sleeping solo - when they've never done it before, it's going to feel different and maybe uncomfortable in the beginning.
But, being alone, just like sleeping alone are valuable life skills that we need to be encouraging with our children.
Whenever your child is playing alone, praise them. This is called "catching them being good"
So, start with even a few minutes during the day where they play outside of your line of sight. Using a timer is great. Maybe just 2 or 3 minutes and then shower them with praise. And then increase the time from there. You can do this exercise in their room or any room in the house.
The more practice they have at it, the easier it will get. So start today!
If these feelings only come up at bedtime, and your child spend time alone during the day with no issues, then it's more likely that they just prefer to have you with them at night. And they probably don't have a lot of practice falling asleep alone yet. And that's okay. New experiences can seem scary - like going to daycare or going down the slide for the first time. But once kids have the experience and see that they're safe & successful, it's not so scary anymore.
This video will show you an easy, sweet craft project you can do with your child that ties to my favorite bedtime book about separation anxiety - The Invisible String by Patrice Karst
The Invisible String by Patrice Karst
Here is another video with some additional things to consider about separation anxiety at bedtime.