The main factor determining your options is whether you are comfortable having a 3rd party ad provider have access to the IP, user agent (and potentially search term in some cases) of your users.
If that is not a dealbreaker for your use case then there are a lot of different options, including EthicalAds which I believe is a great service.
Understandably, the main reasons for this are because the ad networks need to prevent fraud, and the ad sponsors usually want some kind of measurable metric to determine ROI.
If you are not comfortable with the above compromise then your options for contextual advertising are significantly limited with the only real option being to sell direct ads to companies.
[0] https://coil.com/p/runnaroo/Privacy-and-Search-Engine-Moneti...