the problem could be the cable, but I wouldn't rush to that conclusion. since the image flickers with two different devices (gaming console and cable box), it'd be weird if it was just the cable - it's probably the port itself. try connecting and disconnecting it a few times carefully, see if the contact improves. sometimes the contact is just a bit loose and shifts position. if it keeps flickering even with different cables, then yeah, the port's the problem.
as for repair versus replacement: at 8 months you're very likely still under Samsung's warranty. get in touch with their technical support or wherever you bought it and ask them to assess it - if it's a factory defect (and it probably is, considering it's new), they'll fix it at no cost. don't spend your money on a private repair right off the bat, contact warranty first.
and honestly, a faulty HDMI port on a new TV is way more common than it seems, so don't get frustrated about it. Samsung usually honors the warranty on these things. replacement usually only happens if the repair costs way too much or doesn't make sense, so let the support team evaluate first.