Karla is right. Is this the only pup or one in a litter? I hope nobody gave/sold you a 5 week old puppy.
You need to get your puppy to his Vet for proper worming...DO NOT use any OTC wormers on this puppy....They are dangerous & normally don't work anyway....
Your Vet will be able to give proper worming medicine....
Please hurry...A worm overload as you describe can kill a puppy......Not eating in such a young dog can be fatal also...Make the call now & get your guy the treatment he needs.....
Don't waste any more time on the internet...Call your Vet....Karla