The three most important measures are quite simple:
First: It's best if you can naturally prevent moths from entering your home in the first place. Window screens help to block unwanted moth intrusions. And if the females can’t get in, they can’t lay eggs.
Second: If you won’t be using your woolen garments for an extended period (more than two months), store them in a moth-proof manner to prevent infestation. Items that you return to your closet should either be freshly washed or have been aired out in the sun for at least two days.
Third: Your closet should be attractive to you, but not to moths. Numerous natural repellents such as lavender, bay leaves, cloves, cedar wood, or peppermint can turn closets into a repulsive environment for moths. Refresh these scents regularly.
Of course, none of this guarantees complete protection against moths, but prevention is always easier than having to fight an infestation later.