Taiwan Semiconductor Manufacturing Co. reported quarterly results that topped analysts' estimates on growing AI demand.