Sounds like the broken gold pin is the problem. Since two different keyboards, including a new one that works on another Surface, do nothing on yours, the fault is in your tablet’s connector, not the keyboards.
Before giving up, try a couple of free things. Shut it down completely, then hold the power button for about 20 seconds until the logo shows, and start it again. Also run Windows Update, in case something small is stuck. It probably won’t fix a missing pin, but it costs nothing.
Then look at the connector closely with a flashlight. Sometimes a pin looks missing when it’s just pushed in or dirty. With the device off, you can gently clean it with a dry soft brush or a cotton swab with a tiny bit of alcohol.
If the pin is really gone, I’m afraid you can’t fix it yourself. That connector is built into the Surface’s body, and opening the device is risky because of the glued screen. Your options are:
Check if you’re still under warranty at account.microsoft.com/devices. If so, Microsoft may repair it.
If not, get a quote from Microsoft and from a local repair shop that works on Surfaces, and compare the price.
Meanwhile, use a regular Bluetooth keyboard, or your USB keyboard with a USB-C adapter. Both work fine and will get you through your daily work.
Honestly, a Bluetooth keyboard is the cheapest solution if the repair quote turns out to be high.