Non-avian reptiles have poor metabolism, they can't compete with mammals on endurance. And you need that if you want to be a large herbivore, otherwise mammals will just hunt you to extinction. A reptile also can't be an endurance hunter because mammals will just outrun it.
So non-avian reptiles are forced into the niche of ambush predators (snakes, crocodiles), or they have to stay small and rely on stealth (lizards).
It is not certain that the slow metabolism of reptiles is primitive and that birds and mammals have developed homeothermy independently.
Because there are certain similarities between the homeothermy of birds and that of mammals that seem less likely to be coincidences, there exists an alternative hypothesis, that homeothermy and fast metabolism has already evolved in the ancestor of all amniotes.
Later, in the ancestors of crocodyles, of turtles and in that of lizards and snakes (both etymologically and cladistically, it would be better to apply the term "reptiles" only to lizards and snakes), poikilothermy and slow metabolism have evolved as an adaptation that allows the reptiles to live using much less food than needed by birds and mammals.
This reversal appears especially likely for crocodiles, whose ancestors were terrestrial and agile.
Such a reversal is also consistent with the fact that reptiles need a high body temperature for a normal activity, unlike the amphibians, for which there is no doubt that they did not have an ancestor with homeothermy. To reach their required body temperature, reptiles need to use external sources, e.g. basking in sun light. Because of their dependence on external sources of heat, reptiles become rare or completely absent in colder climates, where amphibians are still abundant.
> It is not certain that the slow metabolism of reptiles is primitive and that birds and mammals have developed homeothermy independently.
Reptiles are just as evolved as mammals. So their metabolism is not primitive, it's just not high-intensive.
> Because there are certain similarities between the homeothermy of birds and that of mammals that seem less likely to be coincidences, there exists an alternative hypothesis, that homeothermy and fast metabolism has already evolved in the ancestor of all amniotes.
Nope. Warm-blooded metabolism is not that hard to evolve, it's just that the intermediate stages are not viable in the presence of very adapted mammals with which you'll have to compete.
For example, tegu lizards are optionally endothermic. They can raise their body temperature by more than 10C, they use that during the mating season.
> Later, in the ancestors of crocodyles, of turtles and in that of lizards and snakes
Crocodiles and snakes are just as [un]related as birds and mammals. If you want to separate birds from crocodiles, then you need to include mammals into reptiles.
given that only 2 branches of montremes exist in the present day. Its kind of a miracle we get to come on the scene as a species in time to see them because they are really not positioned to survive much longer wether or not we are around.