There are a few factors to consider here. If you’re looking for dry dog food/kibble, you could technically leave a bowl of dog food out through the day and base the dog’s intake on how many cups they should have. Don’t leave your dog food on the floor for longer than a day and be sure to replace any uneaten food, for the next day (if you dog has a sudden lack of appetite, be sure to ring your local vet about ways to help with this).
You can also give your dog a time-limited amount to eat. This would mean putting smaller bowls of food down, through the day, at the same time each day. This gives your dog a routine and also works well for house-training your puppy, as they’ll usually need the bathroom shortly after having their dinner!
If you’re choosing wet food, however, you shouldn’t allow the food to stand for longer than an hour. Not only would this attract flies (yuck) but the food quickly turns foul and can cause stomach upsets in your pup.