Okay, in your final Query Transform that would be just before your XML Output File, right-click on the Query Transform on the Target Schema. There you would see an option “Generate XML Schema” fairly at the bottom. You could use that to create the XSD File.
But note that this XSD might not be your final XSD. It might not be 100% correct, e.g. missing root node, missing rules etc. Use it as a starting point only.