When you are on a strict diet 5 days a week and then allow yourself 2 cheat days on the weekend, you risk all your progress.
Unless you are counting calories precisely, your weekly average calorie intake may actually be higher than if you wouldn’t be on a diet at all.
Psychologically, restricting yourself for 5 days may lead you to binge eating or ordering high-calorie (foods that you wouldn’t even be interested in if you wouldn’t be dieting throughout the week).
To avoid this, you have to either count calories very carefully, which is not sustainable for most people who are not athletes. A more realistic option would be to not restrict yourself as much. Eat a healthy, varied diet, and allow yourself smaller treats whenever you want them, not when you have scheduled them in. This is a more holistic approach that will keep you sane and will work long-term.