Question: why can’t I lose weight?

As soon as I start a diet, there are always reasons to have an unplanned snack or cook something wrong??? My grandmother and mother were overweight, and when I was little, they overfed me and made me eat, saying thank you!