The Nasdaq Composite is on the brink of posting its strongest start to the year ever, as the flagship tech index shakes off a dreadful 2022 on the back of newfound excitement for the sector—a surge fueled partly by the rise of artificial intelligence.