The primary reason “Star Wars” won the Cold War was the inability of the USSR to compete financially. They didn’t have the funds for this new arms race, and when Reagan wouldn’t abandon it they were doomed.
So what was Star Wars? IMHO it was a multiple threat attack against the Soviet Union without the use of direct military power. It was economic. It was societal. And, if successful , it was military. The final thrust was way down the road; the other two were immediate.
I have said multiple times since my retirement from the AF in 1990 that you can not understand war until you understand economics. This has been true at least as far back as the Napoleonic era (early 1800s). Then a Maritime Power (England) eventually defeated a Continental Power (France) through subsidized alliances.
Regan knew (understood? guessed?) that the Soviet Union could not follow the US into a Star Wars based military posture. The Russians had us beat when it came to conventional indices of military power (men, guns, ships, aircraft, missiles) and could easily maintain or extend their leads - we couldn’t catch up. So, by jumping into Star Wars Regan forced the Russians to start building a new technological base while maintaining their old ones. This was economically impossible no matter how much the Russians spent.
Additionally, Star Wars posed an indirect attack on the Soviet System. To rapidly develop the new technological base they had to abandon one of their political triads - the powerful secret police that kept their political system functioning. Since the 19th century Russian society has been built on three pillars - the elite, the Army, and the Secret Police. To do things rapidly you have to allow rapid and free communications across multiple levels of a society; but, that was against a pillar of Russian societal norms.
Oh, BTW, the Russians are equally scared of Star War’s little brother - the ground based Patriot Batteries with their limited anti-ballistic missile capabilities.