I have esigned a mini power supply which uses as input either a 12V power adapter or a USB-C charger capable of delivering 9-20V.
I have used the Buck booster the as inteface:
and for the USB connection a trigger board:
The switch from the back comuntes from 12V power adapter to the PD trigger board input.