The semiconductor industry is unusual in that it is driven by a few individuals who innovate the technology. If you read up on the early history of the industry and William Shockley, you get an understanding of how much influence a few individuals had. Many people believe that Silicon Valley won over as the tech center over many competing locations because Shockley and a small group of his engineers decided to locate there. To understand why a particular location dominates in a field, it may be useful to understand why Silicon Valley won over places like Boston and the Research Triangle, places that invested heavily in computer technology but lost out to SV.
To understand why Taiwan has the lead in semiconductors today, you have to read up on Morris Chang. I'm going to give a controversial answer to your question but even if one does not agree with it, you can't hope to get any clarity without reading up on MC. His wikipedia page doesn't really give insight so I would look at other sources.
Early in his career, Morris Chang worked at Texas Instruments. He was considered brilliant and almost solely drove leaps in the success of TI. Due to space, I won't get into it but you should read up separately on his achievements there. MC ended up becoming a VP at TI and was considered a shoo in for CEO. When the opportunity came up, the company unexpectedly chose another person for CEO. Chang quickly left TI after that and ended up forming TSMC in Taiwan. TSMC is largely the reason Taiwan is leading in semi production.
Presumably, he was denied the CEO position due to his race. It can't be proven but there isn't any other compelling reason. He wasn't born in Taiwan and had never been there prior to taking an offer to start TSMC there. So he didn't have any special affinity for the island. TSMC should have been a US company. MC studied in the US and had been there since the age of 18.
So the controversial answer to why Taiwan leads in semis is racism. Sergei Brin's family left Russia due to anti-semitism. He ended up founding Google. To believe that one individual could have such influence may be difficult to believe but with enough research and understanding of the field, it becomes the most plausible.