To get New Style ESA you usually need to have been working within the last 2 to 3 years, and have made (or been credited with) Class 1 or Class 2 National insurance Contributions.
This can be through employment or self–employment.
If you are not sure how much National Insurance you’ve pad, you can check online.
You can apply for New Style ESA online
If you cannot apply online call the Universal Credit helpline
Telephone: 0800 328 5644 (choose option 3)
Textphone: 0800 328 1344 (choose option 3)
Relay UK (if you cannot hear or speak on the phone): 18001 then 0800 328 5644
Video relay service for British Sign Language (BSL) users