A 19-year-old has been charged after allegedly using social media platforms to make death threats to the Prime Minister and NSW Premier.