There is a little 3.5mm-to-lightning dongle that came with at least the iPhone 7. Not sure if it comes with the current model, but FYI.
https://www.apple.com/shop/product/MMX62AM/A/lightning-to-35...
https://www.apple.com/shop/product/MMX62AM/A/lightning-to-35...
Also, they’re quite effective devices: https://www.kenrockwell.com/apple/lightning-adapter-audio-qu...
Edit: to be clear, this shouldn’t be needed, but alas, we cannot steer Apple.
It’s not even about charging. It’s about having to buy a USB-C hub just to plug in my headphones and midi controller to my iPad Pro.
I think the better solution if you can afford it is a Bluetooth receiver (Fiio make a nice one) for your old headphones.
If you are getting new earphones get some of the cheap Chinese BT earbuds. They are really cheap these days and work quite well for the money. I got a quite nice pair for ~$35AUD from amazon. Surprisingly good.