There has been an increase from ~50 code execution bugs per year (2016—18) to more than 100 per year (2019—2022) in Windows 10, which makes us think that software has got worse.
Presumably the vast majority of the vulnerabilities in Windows 10 have been in Windows 10 from its release date.
So it is reasonable to assume that we detect more bugs, not that the actual number increased.
I still notice a raft of bugs in iPadOS, including egregious UI errors in new features like multitasking, but the quality of iPadOS is generally improving (anecdotally).