Lana welcome to Flarum!
If you want to add the ad above the header, you should be able to do that with the custom header HTML in Flarum settings.
There is the Flagrow Ads extension which allows inserting HTML in special places but it's currently not compatible with the latest Flarum beta.
For more advanced ad placement, you would have to use the Flarum javascript API to extend the single page app and add new components, similarly to what the Flagrow Ads extension does.