Finding out why your dog is no longer eating their food is usually about understanding the circumstances.
You need to rule out obvious problems by asking simple questions. Does their food look or smell different? Is the food still in date? Has the foods recipe changed (if in doubt there’s usually a number on the pack you can call to check)? And so on. More often than not the solution is a simple one.
However, if your dog has not eaten this food or any other food for more than a day, then I would advise taking your dog to the vet.
If there is nothing wrong with the food or your dog, it may just be a time to change foods. Is this a new brand they’ve not eaten before? If so then you can find advice on switching your dog’s food here. This advice may also be relevant to those who haven’t changed foods, as your dog’s possibly telling it’s time to consider a change.