Social media companies with the biggest reach or posing the highest risk to Australians will have to proactively mitigate harms from their products under an overhaul of online safety laws.