Do we just withdraw our funds and then pay tax or does it have to be sorted out before withdrawing?
You pay taxes on your capital gains over the year, this means that there is no "sorting out" before withdrawing!
I don't know if you ever encountered or will encounter such a thing but again, this is a place to mention a warning for everyone that any shady exchange asking you for a sum of money to pay taxes before withdrawing your fund is a scam!
If for example I had spent £5k on crypto during 2022/2023 and in 2024 I wanted to withdraw £100k profits, what is the tax on that and how do I pay it?
@Pokapoka124 linked you to a tax calculator, selling Bitcoins at a profit in UK will make you pay Capital Tax gains, depending on your other income and the amount you have cashed out you might qualify for the no tax, low tax or in the case above you're going over the brackets so you'll have to pay around £12k for this.
But things change, Uk is moving to lower the CGT allowance from £12.3k to £6k this year and even further to maybe £3k the next so it all comes down to what the taxes are in the year you want to sell and take your profits! And nobody can be really sure what these will be in 2024!