<< the Mac refused to see it anymore, restarts, unplug and plug back in, different HDMI cables, nothing. >>
Using a different cable is a fix for BROKEN cables. It does nothing to improve a sub-par cable into an acceptably-good working cable.
Cables "found" behind your TV set are not likely to be high enough spec to be usable for a modern display connected to a modern Mac.
HDMI cables you want for HDMI-only Displays (higher resolutions than 720p TV sets) are marked as Certified with an anti-counterfeiting tag and are labeled:
"PREMIUM High Speed HDMI cable" or that + "with Ethernet" (up to 4K at 30Hz) --OR--
“ULTRA High Speed HDMI cable" or that + "48G" (supports higher resolutions and backward-compatible)
Cables with No Certification tags are good for your standard 720p TV set, and not much more.
HDMI was invented for HD TV sets. it works great at its original resolution of 720i or 720p. At higher resolutions, it quickly develops issues that are complex to solve, and the cables and adapters required to solve are NOT intuitive.