Unfortunately, it is not quite clear what kind of query you are referring to, so please provide more details. Also, please note that if you use this hook, the parameters are old status, new status, and vendor object, from which you can fetch any data.
My idea was to filter that the vendor is actually published, but I realised that the vendor actually exists even before the vendor submit form is submitted, so in this case I don’t need to filter on the vendor status. All good, fixed it! Thanks for the input!