Perhaps you should try a force reset ⇢
Force restart iPhone - Apple Support
If a force reset is without success, I recommend you take your iPhone to your nearest Apple Store or Apple Authorized Service Provider to have it taken a look at. Keep in mind you are still in the limited warranty period, which covers your iPhone against manufacturing issues. ⚛️
⇢ Genius Bar Reservation and Apple Support Options - Apple
⇢ Find Locations
Also, in some regions Apple offers a 14 day return policy, so you may be able to return your iPhone for a new one.
⇢ Returns & Refunds - Shopping Help - Apple