iPhone prompts password for a non existent account
My screen for my iPhone 5s was broken and I got another phone (android) as a birthday gift. I went ahead and download my data (just the photos) then proceeded to delete the iCloud account completely. I was prompted that after a certain amount of time, the account would be deleted. Anyways, a couple of months passed and I was offered a great deal to repair the iPhone and it was repaired. I tried to get in my iPhone and start from scratch but my phone was stucked in an endless prompt that I needed to enter the password for the old account that I deleted. I know the password I had for that account but it does not work because the account no longer exists. I went ahead and tried to sign in on icloud and my apple Id and etc but it would say this username/ account does not exist. I cannot delete the account because it is asking me for this password but it makes no sense because it doesn't exist. I have access to my old email and everything but I need assistance because this is not working
iPhone 5s, iOS 12