If you’re reducing calories to lose weight, add some weight lifting type exercises (body weight, actual weights, random heavy stuff around the house, whatever works for you, your muscles don‘t care if it’s a proper dumbbell or a can of soup) to help maintain muscle. Muscle is calorically ‘expensive’ to have around because just having it sitting there (when you are not exercising) takes some energy. So our bodies, when we are not getting enough calories in, look for ways to reduce our caloric needs, which removing ‘excess’ muscle does nicely. So you want to be using it enough that your body thinks you need to keep it around.
The flip side to this is that building some muscles like the big ones in your thighs and butt can help with dieting since they raise your maintenance calorie needs, which means you can eat more food and still have a calorie deficit. For smaller build people - like women - this can be especially helpful as for some people the amount of maintenance calories is pretty low, so when you reduce that further to be in deficit you have trouble getting a balanced diet, plus you’re not eating enough volume to not feel hungry all the time. So if you can put in some time doing stuff like squats, you may find that you’re then able to have a more reasonable calorie intake and still lose weight. Though as above you have to keep doing the squats so your body doesn’t try to reduce all that lovely new muscle.
(You can sometimes build a little muscle mass while eating in a caloric deficit, but if you really want to put muscle on, you’re best to do that before starting the diet, as your body also resists adding new muscle while you’re in a caloric deficit. So you’ll be doing work for minimal gain vs doing some strength building work first.) (And since some women do worry, you are very unlikely to end up built like the She-Hulk from adding weight lifting to your exercise schedule unless you’re really working for it. Women just tend to put on less bulky - and thus less obvious - muscle mass. Genetics and hormones and so on.)