The Supreme Court ruled Friday that public officials may block people on social media in certain limited circumstances in response to two challenges involving officials in Michigan and California who blocked followers who were critical of them on Facebook and X.