Online platforms will have to comply with a number of fresh safety measures, known as the Illegal Harms Codes, laid out by Ofcom.