The United Kingdom ranks around 22nd among countries in terms of population. Its economy is somewhere between the fifth and seventh-largest in the world in terms of nominal GDP (in US dollars), which is comparable to the economies of India and France. In terms of wealth – that is, GDP adjusted for population – it ranks anywhere from 22nd to 30th.
It is not particularly easy for a national economy to be both big and also very wealthy. Many of the world’s wealthiest countries tend to be quite small in terms of population and nominal GDP. In fact, of the world’s 20 wealthiest countries, only around 10 are also among the most populous. Chief among those is the United States, which currently leads the world in terms of nominal GDP and is among the world’s most populous and wealthiest countries. So the US does particularly well, and the UK also does quite well.