Most site like VIMEO and Youtube re-encode the video you upload to their standards upon upload so it doesn’t much matter. The only thing that does is the resolution - 4K, HD. 4K is best if you have shot in 4K originally.
For streaming on a private network the HEVC codec produces the highest quality for the smallest file size, but may not play on older systems. AVC/h.264 will provide the same quality with 4x the file size and wider compatibility.