Most people throw away an entire table lamp when the switch breaks where the incident can be easily fixed. You can start by removing the lamp shade, which is followed by the removal of the light bulb from the lamp, and then using a slight force pull up the exterior socket sleeve.
While lastly you need to pull the interior part of the socket switch and through the same order as you removed them, start installing the new interior socket switch and the lamp respectively. Finally, the lamp shade and the light bulb will follow accordingly. Basically, it isn’t a complex task that would require an expert.