Can't get past the setup on a iphone?

My dad got me an iphone. Its an old model but not sure which one… Maybe an iphone 5.
anyway when i turn it on the set up screen comes up… I have to put in english and my region etc. I have managed to connect my Wi-Fi but then the activation lock screen appears. I put in my apple id and password and press next but then it just goes back to the beginning of the set up screen. What id wrong and how do i fix this?

Sounds like you either forgot your passcode so it's kicking out your credentials or the phone is activation locked meaning whoever you got it from either stole it then resold it or they forgot to turn off "find my iPhone". Have you connected it to iTunes?

If by "activation lock" it actually says that then the iPhone can't be used unless the asked for credentials are entered. The iPhone may be a lost or stolen one.

Dad gave you a blacklisted phone.

The previous owner has to take it off his account, either by entering his Apple ID and password, then signing out, or going to iCloud.com and releasing it. There's no way around that.