Braden can you explain what you are trying to do?
There is an analytics extension for Google and Matomo which will automatically insert the code at the correct place and take care of tracking the single page app page changes.
To insert other script or meta tags, there are two options: the custom header and footer HTML in Flarum admin, and our extension API. I think via the forum search you should be able to locate examples how to inject HTML in the head using the extension API and the extend.php
file.
The PHP blade templates in vendor
shouldn't be edited because those files will be overridden by Composer on update.