Advice, beginner needs help with the purchase

Good day, I need your help. And I have finished my A2 driver’s license in a week and am looking for a bike. A good friend of mine would sell me his Z800 year: 2013 with almost 10,000km. Inspection would let him remake it. Now to my question: should I buy you, or rather buy a new MT07 or something like that? So far I had only bad luck with used cars, in which I had to invest a lot of money. Bike experience. Or can I, if the test drive has gone well, strike calmly? Thank you for your help.