Weight Loss & food

So

So I’ve heard that it takes a healthy diet to lose weight, and that if you don’t eat right while you exercise then nothing will change. I’ve also heard that it’s okay to eat whatever, but in the right portions and you could still healthily lose weight. Can anyone provide insight? I know eating right is always the way to go, but I’m absolutely horrible at dieting and I eat everything in sight lol. I’m just looking to lose some fat, nothing major