Charging phones and other devices via USB has two common issues: Firstly, you need to make sure you have the correct cable to fit the charge port on your device. Secondly, these ports tend to attract all kinds of lint and dirt from who knows where, and suddenly your device doesn't want to charge because the charge cable isn't making good contact.
To overcome both of these issues, some genius came up with magnetic charging cables. You start with a generic cable. On one end is a standard USB plug that will fit your wall charger or computer USB ports. The other end has a strong magnet. Now here's the real genius part. You get a tiny plug that installs permanently (don't worry, not 'permanent' as in you can never remove it, just permanent as in you can leave it in) into the charge port of your device.
The plug is highly attracted to the magnet on the end of the charger cable, and when you put them together they lock and your phone charges. When you aren't charging you have a plug in your charge port that's protecting it and keeping all of that crud out too.
Make sure you check what kind of USB port your device has (newer phones usually have USB-C, and older ones have Micro-USB, and iPhones still have the Lightning port - but double check!). If you want some extra plugs to keep as spares or so you can use one cable with multiple devices, you can order just the plugs too.