What is your ultimate goal? As Sam has stated, the rbp4 mediacenter package is already available in the OSMC repository, so can be installed using apt / apt-get. No compilation necessary.
I’m in the same situation, my main goal is to download a image to put on a SD Card and start to use on rbp4 and retire an old rbp2.
If i have to do apt install, i’m assuming that i have to have an OS installed in order to run the command apt install… right?
Wich OS do you advise to install first? Raspberry Pi OS
It is not currently at the stage where a simple set of steps is going to get you where you want to go. Don’t take this the wrong way, but basically if you have to ask how to build it, then this currently isn’t a path you want to go down. A better choice it you wanted to get a RPi 4 running today would be to just install Pi OS or LibreElec.