YouTube has agreed to a $24.5 million settlement with President Donald Trump following his suspension from the platform.