It's true that methane has a much greater impact, but only in the short term. Long term, CO2 is much more dangerous. The methane that cow produces is recycled as it circulates through the atmosphere -> plants -> cows -> atmosphere cycle. Fossil fuel burning on the other hand is not. It's released from the ground and there's no way for it to get back there.
Nothing is ever black and white and to think that eliminating the animals as the food source would solve the problem is naive.
https://onezero.medium.com/cow-farts-are-not-the-problem-f57...
https://medium.com/@caroline.stocks/debunking-the-methane-my...