Its self fulfilling, finite resources cannot support infinite growth. There's only a certain percentage of arable land in the world. If everyone decided to be veggie then yes you could support a larger global population, but you still would hit a hard limit. As awful as it sounds and yes it is truly terrible, people living longer in the developed world and the reduction in infant mortality in countries with very high birth rates is just compounding the problem.
As populations grow so does their effect on the climate. The ultimate out turn, just like with populations of any animal will be famine and unlike most animals, the human obsession of war.
https://www.theguardian.com/world/2021/may/08/are-there-too-many-people-all-bets-are-off
Anyway sorry for going down that rabbit hole, as you were !