The government doesn't have to specify how, they just need to specify the consequences of failure to comply.
It's like not selling alcohol to minors, if the merchant (Facebook & co) does so they get heavily fined. If they repeatedly offend they are barred from operating as a business.
Induce sufficient fear in big tech and they will pivot to applying their profit optimizing to legal compliance instead.