In its last version, Google Ads ask for consent in accordance with GDPR, and it's necessary to have this consent before launching the script.
In that case, it is necessary to add this script to your page :
You will need to load this script preferably in the
<head> section of your site, independently of Google Ads. As soon as the user will give his consent, the Google script will go back to its usual behavior and will send the ad requests to its servers.
This script is a simple adaptation of the documentation given by Google here at the following address : https://support.google.com/adsense/answer/9042142?hl=en&ref_topic=7670012