A regulator will have powers to fine firms such as Google and Meta if they fail to follow new rules.