I am in a similar situation. Just after or perhaps during the ios17 update my battery couldn’t seem to charge up past around 3%. Running a diagnostic through a chat support was inconclusive, so I made an appointment and of course we are able to get it up past 3% with a new cord and brick (even though I had been using a new Anker cord and brick) and end up buying a new cable and brick.
10 days after an update is supposedly a significant mark where whatever was up with my battery may have gotten worked out. I was told if it keeps failing on me, then come back after Xmas.
So the day after Xmas after having no problems at all with the new charging cable and block, it will only give me the “plug Mr in to charge” icon despite being plugged in - and I have tried every cable, outlet, and block in the house.
CONSPIRING against us Apple?