Taiwan Semiconductor Manufacturing Co. became the latest tech company to pledge billions of dollars in US investments that President Donald Trump will almost certainly take credit for.