It was definitely a race to the moon. The soviets were right there as well...
The soviet launch window at the end of 1968 was a couple weeks ahead of the Apollo 8 launch window. Apollo 8’s mission was just to orbit the moon, but it’s a huge step towards landing there.
The soviets has the same goal in 1968 and we’re preparing just as the Americans were.
The Americans were nervous that the Soviet’s would launch in their window and beat them to the moon. The soviet window came and went. They didn’t launch because they didn’t actually think that the Americans would go through with Apollo 8, since they had such little time to prepare. I don’t remember exactly, but I think it was something like 6 months of prep, which was an insanely short amount of time. On top of the Saturn V rocket, that had only been launched twice before, the second time being a near-disaster, and never manned either.
But Apollo 8 was a success. It met the moon, orbited 10 times in 20 hours, and came home.
No, the Americans weren’t the first in space, but the moon was the goal of the space race.
I highly recommend the book “Rocket Men” by Robert Kurson. It’s about Apollo 8, I just finished it up 5 days ago. Really good read.