The basic circuit to produce a 5V supply would include a charger, a load sharing circuit, and a boost converter:
Load current is always supplied by USB when it's connected, and by the battery when it's not. So the charger never supplies load current.
A low-cost module that includes these functions, and even the 18650 battery holder, would be one of these:
https://www.aliexpress.us/item/3256805528052225.html
It comes in 5V, 9V or 12V output, with or without the battery holder. The one I have has a microUSB input port. The output does not have a USB connector, so you would need to solder wires to it. The module is good for about 1 amp of output current, and the charge current is set to 1A, so your wall wart would need to be able to supply at least 2A.
I had to make two changes to mine to get it to work. The first was to install a switch (which you need anyway) just ahead of the boost converter. Or, they provide pads you can solder-blob across if you don't want a switch.
The second mod was to install a capacitor across the input. It doesn't charge properly without it. I tried a 0.22uF film capacitor, which seemed to work, but I think what it nominally wants is a 100uF electrolytic capacitor like the other such caps on the board.
They mistakenly sent me the 9V version, so I also had to change out one of the resistors, but you shouldn't have to do that. But check the output voltage before you connect anything to its output.
Here's its schematic:
There is also a two-cell version (parallel), but it doesn't provide for a switch.
Edit: It looks like the one I linked to actually has a USB-C input socket.