If you're sure that nothing (case/cover, screen protector, dirt) interferes with your front camera (remove any obstacles, if present), see this support article:--> If Face ID isn't working on your iPhone or iPad Pro and/or this one:--> If an alert says Face ID has been disabled on your iPhone or iPad Pro
If the issue persists, after performing all the steps provided in the above support articles, contact Apple Support directly, using this specific link:--> Apple Support , or, since your iPhone is still covered by warranty, 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