This would not really be about CPU or GPU performance, but whether the GPU has dedicated hardware acceleration for video decoding of the corresponding containers. According to this review, yes:
https://www.guru3d.com/articles-p...
I haven't had any problems with video playback myself so far. On page 2 of the same review you will find a table with the supported hardware decoders, according to which MPEG2 and VC-1 are only supported up to FHD, the rest UHD 60Hz. As far as I understand it, these are very old codecs that were officially only specified up to FHD.
About the RAM: I would say 8GB should be enough, but I installed 16GB myself because it cost the same.
About HDMI: HDMI 2.0 should be enough for UHD 60Hz. Unless you want to use eARC and Dynamic HDR.