Taiwan Semiconductor Manufacturing said its revenue for 2024 rose 34% amid a boom in demand for artificial-intelligence chips.