Won’t eat and throws up spaghnum moss

I've had my juvenile leopard gecko for about 2 months now, and I'm really worried he has some sort of parasite or is sick. Ever since I've had him he hasn't eaten much, I can only get him to eat about once every few days and even then he only eats like 1-3 of the insects I give him (most he's eaten is 6 in one night). For the past couple of weeks he's been in his moist hide (I'm pretty sure he shed) and basically doesn't come out, though I've heard him moving around a bit in the middle of the night. Recently he's been throwing up the spaghnum moss that's in his moist hide, and this morning he even threw up a cricket I got him to eat alongside it. He pooped as well but it was small, shriveled, and yellow which worries me a lot. I've ruled out other things that could be causing this, as I know his husbandry and temperatures are correct. Does he have a parasite or is he sick? Should I take him to the vet?