I think you need to teach him to play by himself. I don't think this is something a needy kid ever just figures out.
First of all - basics. Semi-early bedtime, reliable night sleep, solid nap time? If you don't have those, start there. It gives you free time, plus an overtired kid is a clingy kid.
Assuming sleep is fine and it's his waking hours you're struggling with, I would start up a formalized independent playtime. This lesson will involve some screaming, but I think it's worth it. Baby proof his room. Explain to him that he's going to start learning to play by himself. Use a timer. Provide lots of fun age appropriate toys. Start with short periods of time (10 mins?)
I think this article is helpful:
https://www.babywisemom.com/starting-independent-playtime-late/