The Australian government will legislate for a ban on social media for children under 16, Prime Minister Anthony Albanese said.