The front USB-C ports support data-only at up to 10 G bits/sec. There is no display support connected to the front USB-C ports.
Running a 10 bits/color 4K display like yours at up to 50 Hz requires at least a 20 G bits/sec connection with display support. For USB or ThunderBolt support, that can only be provided by the back ThunderBolt ports.
--------
The HDMI ports supports HDMI 2.1, which REQUIRES certified ULTRA cables, which as den.thed suggests may be sold as 8K capable. Less-capable or too long cables will cause the connection to error-out and disconnect.
Cables "shipped in the box" are guaranteed to have the correct connectors on the end. Other than that, they are often lowest-bidder cables and not able to support highest resolutions on a Mac.