I have an iPhone 15 Pro.
I have many Apple 5W chargers around the house as I like to charge my phone slowly overnight to preserve batter life.
At first, for a few weeks since the phone arrived, it charged OK. Then, the charging became intermittent: sometimes it worked, sometimes it didn't. At first, I thought either the charger or the cable I was using may have become faulty.
I bought a couple of brand new quality Anker USB-A to USB-C cables to try those (https://www.amazon.co.uk/dp/B01M5GMZ6X?ref=ppx_yo2ov_dt_b_product_details&th=1). They didn't work either. However, a different unbranded third-party USB-A to USB-C cable always works with the 5W Apple charger (I think this one possibly came with a Logitech device).
A quality Lindy charger/hub always works with a Syncwire USB-A to USB-C cable (https://www.amazon.co.uk/gp/product/B07TXNLB4P/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1).
Since the problem only occurred about 2 weeks after the iPhone 15 Pro arrived, the issue may have been caused by one of the recent updates.
I've tried restarting the phone and a hard reset, as others reported that this fixed the issue. For me, it hasn't resolved the problem.