The code went through a middleman service
Many generators put their own link inside your code (for example qrco.de, qr.io, me-qr.com). When the trial or subscription ends, they cut that link: the image is fine, but it leads to a payment page or an error.
The destination page changed
The target website was rebuilt, its address changed or the page was deleted. The code works, but it leads to a page that no longer exists.
The image is hard to read
Contrast too low, code too small, printed on a glossy or damaged surface, or a light code on a dark background: some phones cannot read it.