Correct, this would not be sewing, but it’ll kind of start out that way. First, take some thread on a needle and draw it through any “loose” loops. This will halt the progression of the holes – otherwise they can run more, like stockings, before and while you fix it.
Then get yourself a small size crochet hook (if the knit is loose enough to fit a crochet hook) or a hook rug tool. Then closely examine the knit – see how it’s a series of loops around more loops? Take the crochet/rug hook and use it to grasp one of the threads that has come out- the first one down from the row of “loose” loops you ran the thread through. Then remove the thread from just one loop and use the hook to draw the yarn-that-came-out through that loop. Then stick the thread through the new loop you just made, to hold it. Then do the next loose loop the same way, until you have fixed a row in the hole.
At some point you will find loose ends where the moths ate the yarn completely through. Do the same thing as above till it gets so short you cannot use those broken bits to loop through. Then use your hook to weave these ends back in on themselves. Ideally you will not have to tie knots, but there may be no other choice.
This all is the same principle as using a knit loom – you are doing one loop at a time, vertically, rather than across on a needle as regular knitting would do it.
Realistically, this is a difficult thing to describe using the written word, and I’m guessing no easier to pick up from your end. Your best bet is gonna be to find a fiber arts store or meetup group in your area and give then a call. They can usually repair this stuff for you or have you come in to show you in person. I’ll try to find a video here; 1 sec… prepare for edit… OK, here’s a video, but I haven’t watched it yet myself so I can’t vouch for how well it matches my directions above – though it’s almost certainly gonna be correct in it’s own way.