Well, considering the Tories began taking us down the road to what became the online safety act in 2019, many years before the takeover of Twitter, I doubt that very much. As far as the government is concerned, the problems of social media didn't start with musk, he just brought them into very sharp focus.
If X didn't exist and liberals controlled Twitter, this wouldn't be a law