Peter here from Shopify Support!
A refund can fail for a variety of reasons so it's hard to give you a concrete answer as to why without some additional information. If you wanted to follow up below with the payment processor that was used, and the error code that appears in the order timeline, then I'd be happy to do some research to see what I can find out!
To view the payment processor used & the error, you'll want to open the order page, scroll down to the timeline, then click on the failed refund line.
That said, typically a refund will fail if you've updated your payment processor since the order, or there could be an issue with the payment processors API integration. Nevertheless, with further information from the order timeline, we'll be able to figure out why the refund is failing.
All the best,