as others have mentioned mp4 with h264 is almost certainly the most compatible. that being said, I transcode everything to hevc if I can't get it natively, and never have issues. my server literally cannot transcode. it does not have a GPU, and hevc plays natively on every target device I need. even works in browsers these days.
most people will still say h264 is best. but if you're limited on storage space or want to optimize streaming bitrate hevc works wayyy better than it did even just 1 or 2 years ago.