How much you keep as a contractor in the UK depends almost entirely on your IR35 status. Inside IR35 you're effectively taxed as an employee (usually via an umbrella); outside IR35 you can use a Limited Company and draw dividends.
The client pays the umbrella, which deducts employer National Insurance (~15%) and a margin, then pays you through PAYE. You pay Income Tax, employee NI and student loan on what's left. Simple and low-risk, but you keep the least.
Your Ltd company invoices the client. You pay yourself a small salary (often the personal allowance) and take the rest as dividends, avoiding employee NI and paying lower dividend tax rates. The company pays Corporation Tax (~25%) on profit. This usually retains the most, but you must genuinely operate as a business and keep records.