Alphabet has seen revenue soar amid the AI boom, but the company has spent heavily to support growth. The stock has advanced about 7% this year.