The main reason why raising cattle contributes to global warming is:
Cattle have microbes in their stomach that produce methane during digestion.
Methane is a potent greenhouse gas that has a much higher heat-trapping ability compared to carbon dioxide.