x264 opponents are earlier versions of AV1, namely VP8 and VP9.
x265 should be what is compared against AV1 when discussing quality and encode speeds.
We use x264 for compatibility purposes, if your device is intended to play video, it will decode x264. x265 decoders are in a lot of devices at this point, and AV1 is just now starting to see representation.
Unlike mp3s compared to other audio codecs, h264 has the luxury of pretty much ubiquitous support for hardware decoders and encoders against other video codecs, so I believe it will have an even longer life than mp3.
Most things where? Like, the biggest video app on the earth called Youtube uses mostly VP9/AV1 (it will only play H.264 if you don't have any encoding for VP9 OR AV1, which is very, rare).
Netflix also uses H.265/AV1.
Amazon, HBO, Disney, etc also use H.265, but I believe only on higher resolutions.
On Apple world even phone pics uses HEVC (HEIC).
I think it's a total mix honestly (Because tiktok/X/Meta uses h264 as far I know).
They force AV1 and VP9 via software decoding even if your hardware doesn't support it. Youtube been using VP9 for a decade, even without HW support at the time.
Netflix uses AV1 when on mobile data, even if the HW doesn't support as well (for TVs, it need HW decoding).
The only way to not use VP9 on Youtube is if you don't have the codec installed, which is super rare because the codec is open.