Will work unchanged, though (stating the obvious) you'll need to get a new mains power cable (or adapter) for the UK - these are available very easily - Amazon is your best bet from a cost perspective.
I bought a 2018 Intel Mac Mini in Australia - used it in Canada whilst I was working over there and also in Ireland - each time I just bought a new Figure 8 power cable with the appropriate plug (refer Australian version below).
This is compatible with PS4, PS3 Slim, Xbox One S, Xbox One X, Apple TV, printer, power adapter, Samsung UN Series TV, Samsung Smart TV, Samsung Curved TV and 8000 series, Lenovo power brick, HP printer, Apple Airport Time Capsule, Airport Express Base Station, Mac Mini (2014), Apple TV 4K, HP...
Sorry for my sloppy language. By adapter I mean a something that converts the Australian Physical Plug to a UK Plug as they are different. Something like this from Amazon. I personally would go with the Figure 8 cable as recommended above as that's a more robust solution as cables often fall out of adapters.
As an Amazon Associate, MacRumors earns a commission from qualifying purchases made through links in this post.