As noted previously, USB protocol requires negotiation before it will allow current to flow. That means there is a short data exchange between the components to assure that the correct voltage and other criteria is in place before current will flow. It's unlikely that your generic power supply has the means to negotiate with your USB device unless it is designed to work with the USB protocol, even if the voltage (5Vdc) is correct.
if it was anything but usb-c than yes absolutely hack off the end and power your 5v device all day. Did that a lot. There are ways you can do it with usb-c but you are limited to a stupid low 5v power. I forget the allowed current draw. It requires soldering resistors. Doable, but its significantly easier to just get the right charger.
You can find tutorials online about using a pencil as a voltage divider and a car battery to charge usb devices (ones you dont care about and are okay if they burn up) with micro and mini usb connectors.
I believe any USB device will be happy with 5 volts from any power supply. But it's a USB C device that needs higher voltages to work, nothing may happen or you'll get some sort of error indication.
To work with a USB-C PD supply, a USB device with a USB-C connector must have resistors installed on the CC lines to even get 5 volts.