It was a combination of lack of investment in new US designs for a long time because of "peace dividend" with desire for giant leaps forward in technology which led to the current situation the US Navy is facing. Add to that increased tempo of operations in the US-China Pacific escalation, never quite leaving the Middle East, the US fritters away their existing fleet and you get to the current point.
Given that Europe has decent frigate designs and Japan and South Korea have good destroyer designs I think they will surpass this issue.
The US will need to focus on the capital ships, which their allies simply can't help them with. So getting the Ford carrier program right is important.
China started from a much worse starting point to begin with. And given the huge timescales to build these capital ships it will be difficult to attain parity in those to begin with. Assuming China even wanted such a thing which unlike what some think I believe China never did.
China still seems to be seeking parity with US and its East Pacific allies in terms of ships and little else. The US has one supercarrier always deployed in Japan and another one which occasionally joins it. So I think that is China's minimum requirement. Two supercarriers. Three if you consider that two are typically in San Diego besides the other one in Japan.