LED lamp turns off when turned on
The lamp is defective so return it for a replacement. 

If you search on Google for "mainstay LED desk lamp" you will quickly see that this is a relatively inexpensive light and so trying to repair it is next to impractical. A light like this that directly connects to the AC mains:



...will have an electronic circuit board inside that converts the line voltage to the low voltage for the operation of the LED(s). That circuit appears to be bad and I can tell you that they are often really low quality so a faulty one is not surprising.