However, that strongly depends on your use case: where are the files going to be played (which hardware/software, how old, which OS, what battery requirements...)? What are the media to be encoded/decoded like (screencapture, Blu-Ray, voice or acoustic concert...)?
AVC/H.264 is still the king of compatibility and speed/performance, albeit at a lower quality or higher file size. MP3/AAC, depending on the encoder and parameters used, still do a good job and are faster (better optimized) than Opus.
VP9 (video) is kind of niche and complex to use properly, although it is well supported due to its use YouTube. AV1 and its proprietary counterpart are not there yet, although I have a few files encoded (by others) with it and they play mostly fine, but it's on recent hardware/software and it can still be pretty iffy (like e.g. fast forwarding). But the promise is huge!
Re: containers, don't bother with AVI unless on a veeery old stack; go with MKV whenever you can (most flexible) or MP4 when you cannot (most compatible? Especially with proprietary vendors à la Apple).
So you know, like with cipher suites and other things I'd say you have two sets, the "modern" one with HEVC+Opus encapsulated in MKV, or the "compatible" one with AVC+AAC in MP4. I always go with the first one because my requirements allow it and I prefer the space/quality efficiency over anything else, but depending on the use case you may have to resort to the compatible set.