I think that NASA will not do without in this matter. They have an advantage in experience - decades of research and development. Although there is a possibility that NASA will conclude an agreement on a joint flight to the moon with another company.
Mars will be an International effort possibly led by NASA. SpaceX will be involved as a contractor on the NASA/International mission.
I expect this to happen in the 2040s and by then SpaceX will have a reliable "Starship" system that NASA can hire to move bulk cargo. It Starship ever gets "human-rated" it might even carry people. But after the space shuttle, I doubt NASA will allow astronauts on a launch vehicle with no abort system that works from pad to orbit.
SpaceX has no Mars program. At best they will have a launch vehicle and can offer transportation. But remember, the launch cost is only 10% of a typical space mission budget. So if SpaceX can reduce the cost to zero, that saves only 10% of the total. When you see a Falcon 9 on a launchpad you have to figure the vast majority of the cost is inside the nose cone fairing. The rocket costs less than $100M and the spacecraft being launched might cost $1B.
Musk is working in reducing the cost of the cheapest part of going to Mars.
Spacebit's rover Asagumo will launch with NASA in summer 2021, the first British rover and the first time that a rover with robotic legs explores the Moon.
If you meant humans, it will be a NASA mission with landers from the "national team" (a.k.a. blue origins and the old school guys). There is no incentive for SpaceX to make a mission without being paid for it. NASA will pay for development (like for the Dragons) to the winner of the bid.
China is way behind in human exploration despite their advances in robotics.
You are underestimating the hostility of the Lunar environment to human activities. While the Apollo spacesuits were still functional after 3 moonwalks. Suit and wrist connections were becoming sticky and abraded from the slag like grit. Prime physical specimens were developing minor health issues after only 3 days of exposure to lunar dust. What good are humans if they are coughing up blood and experiencing retinal abrasion after only a month?
What kind of power source is going to keep an astronaut alive during the 14 day long night? A robot can be shut down and maintained with minimal heating.
The Chinese are hoping to exploit telepresence robots specifically designed for that environment. The moon is a harsh testing ground. If something works there it stands a good chance of working almost anywhere else in the Solar System.
The moon is a ****hole. You do not want to go there.
I should say that Space X is the closest to achieve this goal. None of the company has such technology like Space X and such an advanced spacecraft for long journeys in space like traweling to Mars. But still, I must admit that in cooperation with NASA the goal will be achieved more rapidly. Also, we cannot deny the success of chienese space exploration department
What are the desired results of going to the moon? That determines the hardware and capabilities that you will need to develop.
If you are going to attempt to mine the lunar surface then the first step is to send something that can investigate geology quickly and effectively. That means putting high resolution cameras and other instruments on highly adaptive mobile platforms.
If you think that a person in a space suit is a mobile adaptive platform put on a pressurized space suit and then try cutting down a tree.
The point is that you need to know why you are going to the moon before you can build the appropriate technology.
SpaceX might be able to deliver a lot of “stuff” to the moon but that does not automatically produce meaningful results.