Robin: find the source of the musty smell. Do you have a leaky window, a crack in the foundation/basement, maybe a small plumbing or roof leak? DEEP clean.
You can then put open bags of charcoal (not the kind with lighter fluid) under beds or in closets. This can help a lot.
You first need to find the cause of the musty odor. If it's mold, you'll need professionals. If it's not mold, make sure you have good ventilation. Use activated charcoal or baking soda that are natural odor absorbers.
I would use baking soda. You can set open baking soda boxes around the house to absorb the smell, you can also sprinkle it on your carpet, let it stand for 30 minutes and then vacuum it up. Another thing that works is lots of fresh air to air out whatever has that musty smell. Here is an article that might help as well - https://www.onegoodthingbyjillee.com/7-ways-to-get-rid-of-musty-smells/