Malaysian authorities have announced legal action against Elon Musk's social media platform X and its AI unit xAI.