The reason the codecs don't work any more, is because no-one is making software that uses them. Microsoft promotes the Windows Media Foundation APIs over DirectShow, and as a result DirectShow Filters (The technical name for your "codecs", FYI.) aren't used by modern Windows software.
DirectShow Filters can still be used on modern windows, even Wine / Proton, but unless the software has support the DirectShow API, it won't utilize them. (In fact there's some OSS projects out there that have bug reports / feature requests for implementing DirectShow support for this exact reason.)
The Windows Media Foundation APIs use "MFTs" (Media Foundation Transforms) as a "replacement" for the functionality provided by DirectShow filters. Note, the quotes around "replacement" however. MFTs are a "replacement" insofar as MFTs are where the decode / encode logic for a particular format is expected to be in WMF. Not because MFTs or WMF itself provides a proper replacement for the use cases that DirectShow's API covers. As a result, most MFTs that exist are made by Microsoft themselves, and shipped with Windows. (Either built-in, or subject to download from the Windows Store.) The developer documentation for making new MFTs isn't exactly great either. Certainly not on the level of quality and abundance for making new DirectShow Filters.
Another issue, is the overall lack of new media formats in the modern era. Back when DirectShow was first made, there wasn't much of a standard API for media handling. (Yes, I know about MCI. For the sake of brevity, we're ignoring that here.) As a result most developers bought some codec from another company and shipped it along with their product. DirectShow Filters made that process easier (Only need to ship the filter, not an entire library), and provided a common interface for other interop with other applications. (A new feature.) In the modern era, most people settled on H.264, using MP4 as a container for storing video in their products. Which Microsoft provides an MFT for. and handles the licensing. As a result, there's little motivation for Windows developers to switch to something else that the OS won't support out of the box, and that often would require additional royalty / licensing payments on top of whatever is already being sent to the MPEG-LA. (See also the reason why Google, and OSS in general, are so happy about AV1.)
As a fun side note: See also why Wine / Proton have poor AV support in modern software. The software requires MFTs in order to decode the media, and because there are few OSS replacement MFTs, Wine / Proton is forced to try and do a messy conversion from WMF to GStreamer to ffmpeg. (I'm kidding. I'm sure every Wine / Proton user out there has purchased and installed a properly licensed H.264 decoder for GStreamer. ;) )