Chosen Solution

I want to replace the usb ports cause they stoped working

Replacing the physical ports is possible. But its also likely you have a deeper issue within the ports logic on the logic board. You really need to run the onboard diagnostics as well as check the port using a USB-C power meter like USB-C Power Meter