Burps are produced when you swallow air.
Normally, this can happen while eating and drinking, but it’s possible to build up air in the stomach through the regular, automatic swallowing that your body does to clear away draining saliva and mucus.
The bubbles in carbonated drinks will often cause burps as well. But the digestive process that produces the smelly and flammable compounds in farts takes place in the long slow trip through the intestines, not in the stomach.
Since air and carbon dioxide are not flammable, you can burp near an open flame without fear of conflagration.