A young man has been charged with terror offences over allegations he was planning a terrorist attack motivated by nationalist and racist extremism.