SpaceX does one thing though… Well, three things. Rocket development, launch services and starlink.
NASA does a whole lot more, they have 10 times as many employees and far more suppliers than SpaceX does. SpaceX is basically a service provider for NASA.
This is kind of like saying that Lockheed Martin is more efficient than the department of defense.