Using Plugin to Add AdSense Auto Ads to Google AMP Pages in WordPress
You can use any of the plugins mentioned above. But all that matters is that you should locate the settings for header and footer code inserter.
See image below;
Now you should copy the code and place on the header section. Then do the same on the footer section of the plugin.
Then save changes. You are just done!