Microsoft and Meta Platforms are two artificial intelligence (AI) stocks to buy and hold for the long term.