Yes, it takes time because it has to run back through various accounting systems. How long might take depends upon the payment method used, as outlined in this support article --> https://support.apple.com/118224
● Store credit—It might take up to 48 hours to see the refund in your Apple Account balance.
● Mobile phone billing—It might take up to 60 days for the statement to show the refund. Processing time might be affected by your carrier. You can contact your carrier for an update.
● Credit and debit cards, Apple Pay, Apple Cash, and all other payment methods—It might take up to 30 days for the statement to show the refund. If you don't see the refund after 30 days, contact your financial institution."
Where it refers to seeing your money taking many days, the article specifically says "statements" which to me a statement are things that arrive monthly in my mailbox. I know with my cards I can also check online and charges and refunds usually really appear in a day or so.