Are you seeing that line in all screen pages and/or using all apps?
Should be this case, yes, it could be a hardware (screen? other internal component?) failure but we, just users like you, cannot diagnose that issue remotely, sorry.
Since your iPhone is still covered by warranty, I suggest that you make an appointment (*) and have your device inspected at an Apple Store or AASP (Apple Authorized Service Provider) among this list:--> https://locate.apple.com/choose-country-region . After checking it out, they'll give you all the available options.
Regards
Giulio
(*) You can do it: