Try This
Disable 3rd party extensions prior to upgrading.
Run the following command at the root of your Flarum installation:
composer update
Navigate to yourforum.com/admin, enter your database password, and sit tight!
Run the command php flarum cache:clear
(or manually delete .js and .css files in the assets directory).