Hi,
The way to do that would be to make a duplicate of the order with the "copy" button of the order listing, and then edit it to change the prices to be negative.
Now, the numbering wouldn't starts with 1 like you want.
A cleaner solution would be to modify the PDF invoice plugin so that when an order is with the "refunded" status, it would add an extra button "credit note" to the order details page. And when clicking on the button, the system would generate the credit note, similarly to how the invoice is generated but with negative amounts and the corresponding numbering.
And since that plugin already supports UBL for invoices, it could also support UBL credit notes in the future.
But that's a lot of work. Not something I can do in 2 hours.