Gender of baby

When is the earliest you can find out in the UK if you’re having a boy or girl?