Fat loss is totally different from muscle building.
Some of the tips and differences between them are:
1. If you want to lose fat than u must have to be on calorie deficit mode which means you have to consume less calories than your maintenance calories.
2. While, in muscle building you have to consume more calories than your maintenance calories.
3. Cut down your carbohydrates if you want to lose fat.
4. Increase your carbohydrates uf you want to build muscles.
5. Moderate protein intake is must in fat loss.
6. High protein diet is must for muscle building.