Microsoft Corp. is making a multibilllion-dollar investment in OpenAI, the pioneering artificial intelligence research lab behind ChatGPT and DALL-E, as the software giant looks to more closely tie these text and image-generating programs to its offerings.