Take him to the vet. You need to find out what kind of worms he has so they can treat him for that specific worm.
Hope everything comes out ok
I never had any experience of worms until I bought my yorkie, he was (9 month old) from another lady. He is 2lbs and she said he was to much trouble to take care of because he was so small.
But she never once took him to the vet after buying him from the breeder

. The weekend I bought him I took him to the vet to make sure he was healthy and okay. Turns out he probably never had any shots and found out he had round worms

So a treatment later and shots he is now very healthy and 2.5 lbs. and Worm Fee! He will be 1yr old next month.