When you have a provisional licence, things aren’t always as black and white as when you pass but to answer the question, you can buy a car while you’re a learner. It’ll work in exactly the same way as buying a car after passing, with the only difference being that you won’t be able to take it for a test drive.