For that you check the PPSR here-
https://www.ppsr.gov.au/search-the-ppsrand although it's not obvious their VIN number check under 'vehicles' means any registered motor vehicle which includes trailers and caravans with the proviso you can only check a VIN no for vehicles post 1989 when 17 digit VIN nos were introduced. The search will cost you $3.40 by credit card online and you can print off the certificate and keep it for your file so that it is your proof the vehicle is unencumbered as well as not reported stolen or written off.
If encumbered(under finance mortgage) you'll have to establish how much from the financier and arrange with the assistance of the vendor to pay it out at the same time as handing over the balance to him in order to own the vehicle. Otherwise the finacier can repossess it from you and good luck trying to get that back from the vendor as a civil claim.
As far as stolen or written off you should also personally check the VIN, engine nos, year, etc on the compliance plate/vehicle match the PPSR records as well as the rego papers and if they don't you need to discover why not. Make sure the rego is current too via your State online rego check too before you drive it away as in SA every traffic camera is a rego checker and the fines are a belter.