Import WordPress header / footer into an external page(s)

You haven’t really given enough information to know what options you have within the software. You may be able to use a setting or hook into the loading of your forum.
But, if not, perhaps you could use a combination of html, jquery and ajax to solve this.

In your header/footer you could just hold a div

<div id='my-header-customization'></div>

In your js, you could find this and replace the content

let myContent="you can pull this using ajax";

getElementById('my-header-customization').innerHTML = myContent;

Then in your PHP you could setup your AJAX to pull the content from static text, db, etc.

https://stackoverflow.com/questions/6782230/ajax-passing-data-to-php-script

tech