Is there a way to add adsense code (or any HTML code for that matter) to the site? The HTML code is stripped out by the markdown coding method.

Something like that should be put in the theme, probably in the partials/base.html.twig. This way it will be included on all pages irrespective of the content.

If you do start editing the theme, I strongly suggest copying the default antimatter theme and changing the default theme in your user/config/system.yaml