Size constraints are particularly obvious. For instance, it's 6.5M diameter mirror needed to fold up for launch to fit inside the less than 5.4M diameter fairing. That would fit comfortably without folding in Starships 9M diameter. The sunshield wouldn't quite fit unfolded (14m x 29m), but you can almost guarantee that it would have had a simpler deployment mechanism.
Mass constraints are maybe more important, but less obvious. JWST weighs 6161 kg, Starship is aiming for a payload of more like 100,0000 kg, and by taking advantage of orbital refuelling the capability to put that anywhere instead of it being severely reduced past LEO. That means you can use heavier mirrors instead of optimizing them for weight, you can build your structures out of easy to work with materials light metal, instead of hard to work with ones like carbon fiber. You can oversize parts, and include redundant ones if you think they might be needed.
Even if you totally ignored the cost of the launch, the capabilities of a super heavy launcher would make a huge difference. The cost is the icing on the top. It means that as long as you can build a second version for substantially cheaper than the first, you don't have to design the first so that it never fails. For instance, you don't have to design your heatshield on earth and never test the design in 0G until it's on your 10 billion dollar satellite that has to work...
Imagine instead launching components that could be docked together in orbit, tested, and then boosted to it's destination orbit.
Speculation is somewhere in the 70%-90% of original cost.
Doing it after the fact--- some design work would be saved, but how much of the tooling and supply chain still exists? Parts are going to need re-engineering, etc.