"Connecting" sounds very much like an oversimplification. There are deployment tooling that could be helpful to copy a locally installed Flarum onto a VPS. But this might overcomplicate things for you as well, unless you know what you are doing. If you a provision, or configure, a VPS that has an apache/nginx webserver or common control panel, you should be able to install Flarum directly on the VPS.
Can you clarify what exactly your needs are and what the level of experience you have with managing a vps?