Freenom has an FAQ that addresses how to set up DNS:
Usage: Works like any other domain name, use URL Forwarding, free Freenom DNS Service or your own DNS (Name Servers).
Freenom DNS Service: for whom?
DNS can be used by all Freenom users. At registration the default selection is the URL forwarding service. You can choose to use DNS. If you want to use DNS, you have two choices:
You can opt to use the Freenom DNS Service, where within My Freenom you can setup your A, MX and CNAME records.
The easiest way appears to be to use the Freenom DNS service and create an A record with the IP address of EC2 instance. In AWS you will need to assign the EC2 intance to an "elastic IP". You will then need to enter that IP address number into the Freenom DNS as an "A" record. You will also want to create a "www" subdomain DNS record as a second "A" record with the same IP address.
The 188.8.131.52 is Freenom's public DNS server. You don't need to use that at all to get your site working. It is a completely separate service from Freenom that can replace the DNS settings on your home computer. Freenom allows home users to use their DNS services rather than those supplied by the ISP.
Since you asked in the comments about Amazon's DNS service Route 53, I'll include instructions for it as well. Instead of using Freenom for DNS, you could use Route 53 instead. To do so, you would have to set up your zone record in Route 53. The process is similar where you add an "A" record for your EC2 instance with an elastic IP address. Follow Amazon's intructions for creating a hosted zone
Then you note the name servers that Route 53 wants you to use. There will be four name servers that it give you with names like
ns-431.awsdns-53.com. Go to Freenom and set up the nameserver or NS records for the domain with those values. You can follow Freenom's instructions for setting up the NS records.