A 22-year-old man has been sentenced after he was caught carrying drugs with a street value of more than £8k.