A flickering lamp could be a challenge especially if you are not an expert with changing the electrical cord. I have found that it takes a little investigative work to first see what the problem is and then determine how it will be resolved. Sometimes if you check to see if the bulb is loose, it is a quick tightening of the bulb. Sometimes it is the electrical cord attached to the switch on the stem of the lamp or even the little rolling switch in the cord. Whatever the case make sure you check things out thoroughly.
If you find it is the electrical cord and the switch makes the bulb flicker, you can head to the local hardware store to check out their lamp part section of the store. Most hardware stores have something but not usually all that you need. I you still cannot find what you need, you can visit a local lighting boutique and see if they use a website that a large array of parts can be found.
I recently found my nightstand lamps needed some attending to as both of them were flickering. Turns out it is the electrical cord where the rolling switch is connected. You will need a precision screw driver set to open up the little switch but before any creativity in the fixing of anything electrical, unplug the lamp. As I was looking at the wire in the rolling switch, everything seemed to be perfect. So I put it back together and found it still flickered. In taking it apart again, I pulled the wires out to inspect further. I noticed a slight tear in the wire further down that was not visible while it was in the rolling switch. I headed over to the local hardware store and found exactly what I needed. The parts do not come separate as it was a whole new wire with the rolling switch already to be connected. Now I have to take apart the lamp to install the new. When you unassembled the lamp, lay out all the parts in order so you know what attachment or part comes next. I used to work in a lighting store and would assemble lights all the time. It is an easy process but you must be patient as you do this project. If you are a person who does not like to do these things, you can always find someone who can repair it for you at a cost, depending on the size of the project.
Once you are ready to hook up the new wire, pay close attention to how the wires are connected because you need to do the exact same thing again. This is an easy task and remember to be patient. You can always search the internet to find “how to” videos to help you along the way. Every project you come across to work on may take a little research. Happy repairs and stay safe.