The head of online safety regulator Ofcom has defended the Online Safety Act, saying the “very ambitious” rules will help protect children.