Ads don’t show instantly after the code is applied - the pages are scanned by the AdSense bot (Mediapartners-Google) and then after some time they will appear.
Also, make sure you are not using an AdBlocker and blocking your site.
If I may add here, from my experience with WordPress + W3 Total Cache (all the caches) + Cloudflare (Cache Everything) + Google AdSense + Google AMP (cached + AdSense there too) …
Time and patience.
Google needs to scan the content on your Website.
Furthermore, scan for existing ads.txt file existance, etc.
After each post is being published, at least an hour after I do not see any Google AdSense ads appear due to either caching or Google AdSense needs to figure out what kind of the ad to create and show to the visitor (regarding cached HTML page + visitor paramerers like cookies, logged-in session, etc.).
I see ads after I hit refresh one-two times (after my first visit) in that hour of being published to get them shown, while later they appeary normally to the each visitor/user …