All chargers deliver 5 volts DC but the connector that plugs into the phone can vary. However, under an EU ruling, all modern phones should now have the same USB-C charging port. So, if your phone has a USB-C port, you can use any make of charger that has a USB-C connector on the end of the power lead.
To check whether your phone has a USB-C port, look at the connector on the dud charger:
https://www.mymemory.co.uk/blog/wp-content/uploads/2019/03/5-1.jpg
A USB-C connector is the only type that will fit into your phone 'both ways round'. (All of the others need to be 'the right way up').
You might not even need a new charger anyway though. If the lead that goes from your dud charger to your phone is undamaged and has a 'regular' USB port (='USB-A') at the charger end (rather than being a fixed part of the charger itself), you can simply plug it into any other 'regular' USB port to charge your phone. (If you've not got a suitable port available, you can just buy something like this:
https://www.bmstores.co.uk/products/goodmans-2-port-usb-fast-charger-white-3903431 ).