Maybe for ranitidine, but for the ARBs (common blood pressure treatment drugs) that are a few decades old, the NMxA source was sourced from a new synthetic route and that's when they appeared in the drug supply: "It believes there has been NDMA contamination in those drugs for up to four years."
> Ultimately, scientists traced the contamination back to a change in valsartan’s synthesis. The antihypertensive drug contains a tetrazole ring, which is an aromatic five-membered ring with one carbon atom and four nitrogens. For many years, the synthesis for this compound, developed by Novartis, used tributyltin azide to form the tetrazole, with xylene as a solvent. However, in 2014, China’s Zhejiang Huahai Pharmaceutical, which makes valsartan for some companies, filed a patent for an improved method for forming the tetrazole ring.
https://www.lexology.com/library/detail.aspx?g=fcf817fe-192b...
> Ultimately, scientists traced the contamination back to a change in valsartan’s synthesis. The antihypertensive drug contains a tetrazole ring, which is an aromatic five-membered ring with one carbon atom and four nitrogens. For many years, the synthesis for this compound, developed by Novartis, used tributyltin azide to form the tetrazole, with xylene as a solvent. However, in 2014, China’s Zhejiang Huahai Pharmaceutical, which makes valsartan for some companies, filed a patent for an improved method for forming the tetrazole ring.
https://cen.acs.org/pharmaceuticals/pharmaceutical-chemicals...