Reagan rebuilt America's armed forces whereby the U.S. was able to pursue a policy of peace through strength, reversing the weakening of the military during the Carter administration.
You are aware that the military build up was started by Jimmy Carter, right?
Carter was weak and vacillating in defense matters
E.g., he cut back on the navy's shipbuilding program, while the Soviets had strengthened their forces.
Even Democratic Senator Henry Jackson found Carter to be weak, ineffective, and confused in defense matters.
Scoop Jackson found everyone short of Jack D. Ripper to be weak, ineffective, and confused in defense matters.
Henry Kissinger, one of the foremost authorities on defense and foreign policy matters in history, held the same view on Carter's defense policies as did Scoop Jackson, in other words, Kissinger found Carter's defense policies to be weak, ineffective, and confused.
Kissinger was the Secretary of State for the last liberal president, so his solution to Carter's problems was different then Reagan's.