The justices, who asked tough questions of both sides, showed skepticism toward arguments by lawyers for TikTok and its users.