The exact same thing sent me down a stupid rabbit hole of blaming plugs, cables, and even the extension lead in my office. One charger would work for twenty minutes, another would connect and drop out, then everything would behave normally at home. I tested three cables before admitting the phone was the common problem. What finally pointed me somewhere useful was phone repairs manchester instead of another evening of random YouTube fixes. The port got checked properly, the fault was sorted, and I stopped carrying spare cables everywhere.