macOS 14 Sonoma QuickTime Player (and QuickLook) does not play video codecs like H.265 with Codec ID hev1, VP8 and VP9, and audio codecs Vorbis (Sonoma now supports Opus audio), and wrappers like .avi, .mkv and .webm.
ffmpeg can losslessly and very fast fix that H.265 with Codec ID hev1 issue with:
ffmpeg -i input.mp4 -c copy -tag:v hvc1 output.mp4
I have heard that starting with Ventura 13.4 on Apple Silicon, Sony XAVC-S (H.264) 10-bit 4:2:2 .mp4 at 100 fps or 120 fps shows black video and no audio in FCP 10.6.5 and Resolve Studio 18.1.4.
IINA and VLC should have no issues with playing any decent new or old codec.
Handbrake, Shutter Encoder, VLC and ffmpeg can be used to convert old codecs to H.264 or H.265 video and AAC audio wrapped as .mp4 (or its very close cousin .m4v or .mov. I have used MacPorts to install ffmpeg but there are also precompiled versions).
Avidemux and ffmpeg can be used to losslessly fix some issues with codecs or wrappers.
https://iina.io
https://www.videolan.org
https://handbrake.fr
https://www.shutterencoder.com/
https://avidemux.sourceforge.net
https://ffmpeg.org
https://www.macports.org
You can check all those pesky codec details with apps like MediaInfo or Invisor.
https://mediaarea.net/en/MediaInfo
https://www.invisorapp.com