Buying the base game is single player only. So if you wanna play it with your friend just purchases Red Dead Online.
Depends where you intend to buy from, but from what I've seen most versions of Red Dead Redemption 2 include both the single-player Story mode and the multi-player Online mode. If you're not interested in the single-player then you can just get the Red Dead Online version, though a lot of players say the single-player Story is really good and well worth playing.
You might want to consider the Ultimate version as well, which includes both the single-player Story and the multi-player Online modes along with some digital extras for both game modes such as a horse (quite decent), 3 free weapons (also quite decent), a couple of outfits plus some other stuff.