Farming emits greenhouse gases of various kinds, linked to different activities.
Here is a summary of the gases emitted which contribute to the greenhouse effect:

Methane, of formula CH4, emitted by ruminants by belching during the digestion of cellulose (the famous “cow’s burp”) and that emitted by excrement,
carbon dioxide, CO2, emitted by the use of energy on the farm (fuel oil and electricity) as well as during the manufacturing of inputs and their transportation to the farm (fertilizer, animal feed, and all that we buy outside),
nitrous oxide, N2O, linked to the spreading of mineral and organic fertilizers.
To understand the participation of livestock in the greenhouse effect, in its entirety, it is necessary to be able to add these different gases. They do not all contribute in the same way to the greenhouse effect. They are then converted into CO2 equivalent, the reference gas, according to their heating power.
Thus, methane corresponds to 25 CO2 equivalent and protoxide to 310 CO2 equivalent.

In France, herbivore farming contributes 8% to greenhouse gas emissions. This share has decreased over the past ten years due to the decrease in the number of animals (the cattle population has decreased by 12% since 1990) and the decrease in the quantities of mineral fertilizers used.

Credit : la-viande.fr https://www.la-viande.fr/environnement-ethique/viande-changement-climatique/elevage-gaz-effet-serre