Supreme Court justices are weighing how the First Amendment applies to social media companies, as they consider a pair of cases that could transform how the internet has operated for decades,with sweeping consequences for a host of federal and state efforts to regulate the internet.