It seems your issue isn't a black screen that is not working at all, it is simply the quality of the display and the functioning of the keyboard.
See if simply restarting the phone clears up the issue. If not, take it to a Genius Bar if you can find one, or contact Apple. I also presume you purchased this from Apple and if you are not happy with a product you can return it in a two week period. You could then buy a different one.
Read this support article to learn how to restart your iPhone --> Restart your iPhone - Apple Support
How to make a Genius Bar appointment
1. Go to Genius Bar Reservation and Apple Support Options - Apple
2. Go to "Get hardware help".
3. Select your hardware and continue selecting options requiring replacing parts until you see "Bring in for Repair"
4. Sign in with your Apple ID
or:
Refer to this document for ways to contact Apple ➞ Choose your country or region - Official Apple Support
Select your country (also look for "other" regions), then a product. If you don't see one that handles your issue then keep experimenting with selections until you reach one that gets you a chat session or a telephone call and get the representative to redirect you.
or:
Contact Apple for support and service by telephone ➞ Contact Apple for support and service - Apple Support
Click here to read about Apple Store Returns & Refunds--> Returns & Refunds - Shopping Help - Apple - For the USA "You have 14 calendar days to return an item from the date you received it." The return terms may be different in some countries (the link I provide should open to a page for the country to which your account is set).
- "You can always return the item to any U.S. Apple Store. An Apple Specialist will assist you with your return. Your refund will be processed at that time"