NEW YORK—The S&P 500 and Dow Jones Industrial Average posted closing record highs on the first trading day of the year on Monday, helped by gains in Tesla Inc. and bank shares. Apple Inc. became the first company to hit a $3 trillion market capitalization but ended the day slightly below that. Its shares ended up 2.5 percent at $182.01 after rising as high as $182.88 during the session. Tesla’s shares jumped 13.5 percent after the electric car maker’s quarterly deliveries beat analysts’ estimates, riding out global chip shortages as it ramped up production in China. The two stocks gave the biggest boosts to the S&P 500, but market watchers said easing investor worries about the economic impact of the Omicron variant of the coronavirus also helped market sentiment, even with rising COVID-19 case numbers. “The real news is people feel like this latest round of COVID is not going …