To add, it's often worth investing in a mini heatgun for desoldering/resoldering, typically it's near impossible to resolder the pins by hand as they are so fine.
I've watched videos and ordered the right type of connector. It doesn't seem so hard with flood soldering techniques.
Fortunately the break is clean and happened on the connector's legs, so the traces are unharmed. I think the hardest part will be to remove the remnants left on the traces.
You’re gonna need a hot air station. If it’s actually usb3 and not just usb in a c sized connector then you usually wont be able to do it with just an iron.
The process is:
Clean the site and all through holes (they won’t be for usb pins but instead for physical connection). Use flux.
Reapply solder to all surface mount pads.
Preheat the area.
Apply flux.
Manipulate the new port into place. If you can, tack it down at a few spots.
Reflow all the pins. Use flux.
Have you confirmed that the port itself isn’t damaged? The pads it connects to?
This is why I use a right angle connector cable and gaffer tape the cable to the back or bottom of the keyboard. It’s fugly but it prevents this exact problem.
Magnetic connectors work well in this case, and you won't need that tape. But if you move your keyboard around a lot they might be a slightly worse solution than yours ;-)
My work keyboard has a cheap magnetic cable so I can easily plug and unplug it (I'm not leaving a custom mech unsupervised a work!). It indeed takes most of these strain.
I gave a quick overview in another post, but in case you’d like some guidance unique to your repair, post pictures with the legs of the port and the spot it goes in with good enough focus and zoom that I can see the traces and pads and legs.
I do this kind of repair work every day, if everything is in good shape it’s no problem but if you have a damaged port or ripped pads/traces then you’ll need to change tack a little.