The short answer is no: you don’t need to buy all of the endings (i.e. “domain extensions”) for your website. How many you buy (and how many variations on your name you buy) depends on what your website is for and the size of your budget.
If your domain name is for your business, it is a good idea to buy your domain name with the most common domain extensions, such as .co.uk, .uk, .com, .net, and .org. This is so you secure them before other people have the chance to buy them – it’s about securing your brand. You may wish to do the same with common misspellings or variations too, just in case.
If your domain name is for a personal project, especially one where you don’t know how far it’ll go in the future, you’re probably safe buying only the domain extension you wish to use. If your project gathers momentum, you may wish to then buy the alternatives, once you’re at a point to justify the cost.
If you do buy multiple domain extensions, most people tend to redirect them to whichever domain name is their primary one – so redirecting .com and .net to their .co.uk, for instance. We’d also recommend this approach.
Ultimately, the decision is yours, just bear in mind that if you wish to protect your brand name, it’s a good idea to buy them before others get the chance.