I would keep the steering lock. As others have said, it will prevent the handlebar from turning enough to damage brake lines, wires, or your frame. It shouldn’t have any affect when riding as the handlebar never needs to turn than far.
If you did want to get rid of it, you’d need to replace your headset, or at least the upper headset parts. There is no way to adjust the range of motion, but if it’s uncentered, limiting one direction more than the other, you may be able to remove, straighten and reinstall it. Either way you’ll probably need the help and proper tools of a bike shop.