For a start there isn't a single legal system in the UK - Scotland has a different process for qualifying than England does and NI and Wales might have different processes.
In Scotland to qualify as a lawyer if you already have a first degree in another subject requires 2 years to get an LLB and then another year to get a postgraduate diploma in legal practice (both full time) then 2 years training at a law firm.
From what I can see in England the equivalent of the 2 years LLB takes 1 year but you still have to get a postgraduate qualification and do the training.
The Law Society for England and Wales says 4 years to qualify as as solicitor if you have first degree.
https://www.lawsociety.org.uk/law-careers/becoming-a-solicit...
Qualifying as a barrister (or advocate here in Scotland) ironically may take less time - but that's exceptional.
NB My wife did the "conversion course" route here in Scotland and it took 5 year and she went on to be called to the bar as an Advocate.