I got my laptop brand new less than six months ago, I do digital art so I frequently have the hdmi plugged in, but recently over the past two months or so it began acting weird and now I can only use it if I get lucky and hold it in the exact right position with pressure being exerted on the base of the cord.
I assumed initially it was an issue with the cord I was using, but I bought a new one and still have the same issue, making working basically impossible.
Sounds like you've accidentally bent a connector in the socket. This happens. I fix these myself using a small screwdriver to bend back the metal shroud on the connector until the cable sits firmly in the connector and has good connection. If you don't want to do this (I suppose it could affect your warranty), contact the laptop manufacturer and have them repair or replace the unit.
I felt like it had something to do with being put out of place, I'll see if I can actually see the issue and how confident I feel about doing it myself, thank you for the advice!