Follow this article to erase your iPhone which will remove the Unavailable screen. You will need a computer to restore.
If you forgot your iPhone passcode or your iPhone is disabled - Apple Support
Also when you try to setup the iPhone for use, there will likely be an Activation Lock. Whoever sold you the iPhone likely found or stole it and once they realized they couldn’t bypass the lock decided to resell it and scam someone. If the person that sold you the iPhone owned it, they could have just unlocked it for use themselves. If so, try contacting the seller or else the iPhone is a brick.
Next time, purchase your iPhone from Apple or an Apple Authorized Retailer.
Also read this User Tip: The All Too Common SAD Reality of Buying … - Apple Community