Hyde here from Shopify.
If you are on the Shopify plan ($79) or higher, then you could issue your customer with a gift card as a form of store credit (more information here).
If you're on the basic plan, then all you can really do is issue your customer a refund (here's how).
If you're selling in person, then you can exchange or refund a product via the Shopify POS app as outlined here.
Hope this helps! If you have any other questions let me know.
All the best, Hyde.