redirects – redirecting from www url to non-www url in Google Firebase static hosting

I am using Google Firebase static hosting.

When a user types and enters www.example.com, I want the address to change to example.com and show the user content of example.com.

How can this be achieved? E.g. In Firebase, can I say that I want that subdomain to be redirected there? I don’t think there is a .htaccess file.

Note:

Answers to this question that advise on dns seems to be only one part of the solution. I talked with my domain name and dns manager (Hostinger) tech support, and they insist that there are things to be done on Firebase.