Hi Yesuf
You need to get your timing correct for when you apply for UC. Ideal time to apply is just after you receive your ESA payment.
We would advise you to seek specialist advice from your local Welfare Rights Organisation:
advicelocal.uk where they can take all your circumstances into consideration when giving you advice about when to apply for UC.
Gary.