So you're a Musk fan boy? That's cool.
The dude has made some money and many people want to invest in what he is working on regardless of fundamentals.
There is Tesla, which you can buy via any stock brokerage but SpaceX is not a publicly traded company that you can buy.
Fortunately there is a bit of a backdoor.
The Baron Focused Growth Fund BFGIX holds 9.5% (as of June 20223) in SpaceX. In other words 9.5% of any investment you make in this mutual fund goes to SpaceX. In addition to that it holds 11% in Musk's namesake Tesla.
This is the most concentrated exposure you can get to SpaceX as in investment.
While buying a mutual fund with a 1.32% expense ratio may not be appealing, the fund has had some impressive returns. Since inception in 1996 it has returned 272% more than the Russel 2500 index. Link to the mutual fund page. The fund is available at Schwab with no fee, but personally I'd rather invest in index funds with Betterment.
Altenative To SpaceX
You could also invest in the space industry which would likely do well, if SpaceX does well. The ARK Space Exploration & Innovation ETF (ARKX) is one option that invests at least 80% of its assets in companies engaged in space exploration and innovation.