Hi,
Here is a link to a [https://www.youtube.com/watch?v=B9Rek6Q5kfU|video] that shows how to replace the charge port
Here is a link to just one [https://www.witrigs.com/oem-charging-port-for-sony-xperia-x-compact|supplier] of the part. It is not a recommendation to use them. it is to give an idea of the cost of the part. There may be other suppliers online that suit you better.