Meta, the parent company of Facebook and Instagram, has agreed to pay $25 million to settle a lawsuit filed by former President Donald Trump in 2021.