Yes. It’s a common misconception that because VPNs hide your online identity, their use is illegal, but that is not the case. You are well within your rights to use a VPN in the UK.
VPNs are legal in most countries around the world, including the US, Canada, and most of Europe. VPNs are illegal in countries with governments that practice online surveillance or censorship, such as North Korea, Belarus, Oman, Iraq, and Turkmenistan. In some other countries, including China, Russia, Türkiye, UAE, India, Iran, Egypt, and Uganda, only government-approved VPNs are legal, but these might allow the authorities to monitor users. This undermines the privacy a VPN is meant to provide, so we consider VPNs illegal in those countries and include them in the following list.
From https://nordvpn.com/blog/are-vpns-legal/.