Your domain is pointing to the Freenom’s nameservers right now. To point it to InfinityFree with both www and non-www versions you have to add two records on the DNS Management page for your domain on the Freenom’s Client Area:

After that, save the changes and use this htaccess code that you need to add with the File Manager creating the .htaccess file on the htdocs to redirect the www version of the website to the non-www one:

But seen that you didn’t read it, or used the one that is titled “Using ALIAS records”, let’s put the correct one here:

Using A records

Warning: the IP address of your account may change without warning or notification. Using our nameservers is recommended, and using CNAME records is preferred over using A records.

The IP address associated with a hosting account cannot be found in the control panel, but you can find it yourself. To do so, you will need to look up the IP address associated with your account’s main domain.

You can find the IP address using the dig utility installed on macOS or Linux, or use a web-based tool, like Google’s Dig tool. In the web tool, enter your account’s main domain, whose example is shown on the screenshot that is on that article, and click the button saying “A”. You can find the IP address in the resulting output.

For subdomains, you can create a CNAME record pointing your subdomain to the main domain of your account.

Now it works on both versions, but just with bypassing the SSL certificate error. If you want a SSL certificate, consider using Let’s Encrypt one, seeing that you have custom nameservers, and with it, you can do the “Manual Verification (DNS)” method on sslforfree.com after inputting your domain name without www.