It does 3 things actually:
- Run database migrations that have not been applied yet
- If necessary, updates the Flarum version in the database so that the "upgrade" screen does not appear after a Flarum upgrade
- Copies assets to the assets folder, including core fonts and extensions assets
It doesn't hurt to run the command more often, but it's not necessary after a URL change.
However php flarum cache:clear would be a good idea after a URL change.