Whether your goal is to gain weight, maintain weight, or lose weight, prioritizing strength training is the way to go. The stronger you are overall at any given body weight, the more muscle and less fat you’ll carry.
If weight loss is your goal, I urge you to think of it as “fat loss” rather than “general weight loss.” The goal is not to just be a proportionately smaller version of your current self and potentially end up being “skinny-fat,” it is to lose as much fat as possible and retain as much muscle as possible.
Basic heavy strength training, prioritizing compound movements with some high rep targeted movements sprinkled in, is the best approach to hypertrophy training. What builds muscle best during periods of caloric surpluses also maintains muscle best during periods of caloric deficits. More muscle equals less fat, better shape, and a higher metabolism.