I was in the EMS pipeline at one time....That CO2 buildup triggers the impulse to breathe is a physiological fact....This is why taking booze away from clinical alcoholics will kill them....Their bodies have become acclimated to the elevated CO2 bloodstream levels from decades of ETOH abuse, to the point that if you take the booze away their lizard brain will think that everything is fine and they don't need to draw their next breath.
I just researched "yawning" as to why it is and what it does. There is no real confirmed explanation. I thought it was due to CO2 buildup in the blood and the body gets a good deep breath to get back to good O2 & CO2 levels. But no.
Then there was a study about brain temperature. No again.
Then there was a monkey study, no results, could be everything or nothing.
Just sayin', CO2 levels in the blood varies somewhat, not sure that variance triggers breathing rates, or breathing depths, or yawns??
Yawn - Wikipedia
"Carbon dioxide (CO2) is a colorless gas that comprises approximately 0.04% of Earth’s atmosphere. In the human body, carbon dioxide is formed from the metabolism of carbohydrates, fats, and amino acids, in a process known as cellular respiration. While cellular respiration is notable for being a source of ATP, it also generates the waste product, CO2. The body gets rid of excess CO2 by breathing it out. However, CO2 in its normal range from 38 to 42 mm Hg plays various roles in the human body.
It regulates the pH of blood, stimulates breathing, and influences the affinity hemoglobin has for oxygen (O2). Fluctuations in CO2 levels are highly regulated and can cause disturbances in the human body if normal levels are not maintained."
Physiology, Carbon Dioxide Retention - StatPearls - NCBI Bookshelf
It does cause yawning and it does trigger breathing...