Nitrous oxide is primarily generated from agricultural activities, particularly from the use of nitrogen-based fertilizers. It is also a byproduct of various industrial processes, including nitric acid production and the combustion of fossil fuels and biomass.