Calories in and calories out

Hello! I hope everyone is doing amazing.

I have a question.. So because there's so much information about fitness and weight loss is vey hard to identify what is the most correct.

I believe that fot a diet to be sustanible, for me at least, i can´t "eat clean" 100% of the time, but thats fine because in orther to lose weigh (wich is what im trying to do) you need to be in a caloric defecit and i can fit those calories from "bad food"

But then there's a lot of people that say 1200 kcal for exemple is not nerly enough specially because you want to gain muscle and for that you need to eat more.

What the hell am I suppose to be eating? xD

Should I stick to 500 kcal calorie defficit to lose weight or should I Maybe? I honestly don't know..