A federal judge appeared skeptical about a new Florida law aimed at punishing social-media companies that strip users from their platforms or flag users’ content.

Online-industry groups NetChoice and the Computer & Communications Industry Association this month filed a lawsuit challenging the law, pushed by Gov. Ron DeSantis after Twitter and Facebook blocked former President Donald Trump from their platforms after his supporters rampaged at the U.S. Capital on Jan. 6.