Apple overtook chipmaker Nvidia on Monday to become the world’s most valuable publicly traded company, about two years after it lost the crown. The company’s ascent was as much a…