As long as it's not like VGA or another analog format, cables are a digital signal. For the most part its either it works or it doesn't. Length is a consideration if you're going like 50-100 feet, but you could get a powered cable or a signal booster in that case.
If you're doing higher framerate make sure the cables rated for that, but otherwise you're just paying for the physical build quality, ie, bending/unplugging-plugging frequently without damage
While IN THEORY true, testing has revealed that there is definitely a number of cables that say they are rated for a certain spec, but don't actually meet the spec, so the signal can fail or deteriorate despite everything being within the stated spec. I would personally stay away from the random no name cables that are weirdly super cheap, and just stick with the more well known brands like monoprice or infinite cables
LTT did a cable test and from the cables they tested the DP ones were more consistently good, while more of their hdmi cables were bad or not up to spec.
What length exactly are we talking about here? The length does impact Display Port and HDMI a bit at higher resolutions and refresh rates, but just make sure the cable lists whatever you need, you can buy 5m DisplayPort cables which will support 4K 144Hz and more. For HDMI they make optical cables for longer cables, I have a 10m HDMI cable which supports 4K 144Hz, but I couldn't get even 4K 30 over 10m of cheap HDMI cable (that one only supported 1080p 60).