If you have a Publii theme you can insert your AdSense code. For example, in a theme like Editorial at: https://marketplace.getpublii.com/product/editorial/ – if you scroll down that page, under the heading “Dedicated Ad-Space”, you can see how you can put your ads above content, below content, and on the right side columns.
So the key is to enter your AdSense ad code into the relevant ad sections set up for your theme. Or, if you’re developing your own theme, you’ll need to create the ad sections first.
Much depends on how each theme is designed. Ad space slots are available in both premium themes and some free themes, plus of course, if you design your own theme, or have your custom own theme designed, then you can decide from the outset if you want ad space and where and how your ads appear.