It might actually depend on where the hotel is.
Yes, EU contract law normally guarantees that you are entitled to a refund, but there are some EU governments that have taken extraordinary measures in order to reduce the monetary stress on the hotel and culture sector. For example, the Belgian government has taken some measures that allow the travel sector to forego the refunding of package tours and stays, on the condition that they provide a travel voucher for the same value that’s valid for at least 1 year. You can find information in https://www.vrt.be/vrtnws/nl/2020/03/18/minister-muylle-maatregelen-reizen-en-evenementen/ (It is Dutch, yes, but Google translate works well enough for a readable translation).
I recommend you check the official site for the health department of the country you are visiting as well as their news sites to verify if there are any active measures in the relevant country that may impact your right to a refund.
If hotel is cancelling, you will get refund. Since hotel said that they didn’t charge, you have two things to do.
You will get your money back by then.
Credit:stackoverflow.com‘