First note that we are omnivorous and almost all animals are herbivores will eat meat if they need the protein and it is readily available. The issue is that carbohydrates and cellulose are primarily built out of a carbon backbone. Muscles are protein which are largely made of amino acids (nitrogen basically). The fats in meat are also much more similar to human requirements compared to the comparatively few lipids in plants. It is only recently humans have been able to adopt a vegan lifestyle as suitable plant based alternatives have been developed. Herbivores succeed by synthesizing these products themselves but this is expensive.
An easy way to rectify this is to have a readily available high protein and high energy plant material which removes the need for omnivorous behavior from ever developing. This is kind of the role fruits play in the evolution of monkeys and bird (both of whom also obviously eat bugs and sometimes meat). If eating animals is dangerous but plants are easy, eat plants. If they are alien, make blood fruits or something which where amino acids absorbed by the roots deposit or large nodes on nitrogen fixing plants. You could also make carnivores or scavengers that you can argue aren't really animals so don't count (kind of like sponges, jellyfish, or plankton).
A hole in this is that a large amount of readily available food will result in overpopulation until the food is now scarce. Meat then becomes an attractive option again. There must, therefore, be other factors discouraging meat consumption (lack of available prey or poisonous flesh) or other factors keeping population small. The latter could (for a writer) be a way to promote intelligence as a useful trait. Farming and selective breeding of the food will also promote this.
Factor to keep population small include: predators, malnutrition due to a needed nutrient that isn't in animals, frequent devastating natural disaster which cover large areas, etc.
My personal favorite at the moment is a limited amount of livable habitat. If there is little atmosphere protecting against solar radiation but the plants can survive this, the population will need natural caves to hid in during the day but will need access outside at night to feed. The few large predators (who eat meat as they never evolved a way to digest irradiated fruit without getting cancer) will likely attack entire dens at a time. The driving force for intelligent evolution and teamwork would be many fold. Farming, mining, defense, and den maintenance promote group survival and so they get smart enough to do that. Games during the long days promote education, communication, and cooperation so become encourages during the days. Those who are most intelligent win games, learn to dig instead of just harvest, and teach all keeping them inside away from cancer (or however the damage manifests) increasing lifespan and reproductive life.