Snap has agreed to a tentative settlement in a lawsuit alleging its platform harms children and young adults, following similar settlements by TikTok.