Purchase from iTunes Store in Spain when travelling in Spain
You'll have to change the country on your Apple-ID in order to login to the Spain iTunes Store. The process is described here:

https://support.apple.com/bg-bg/HT201389

Remember that you can just continue to purchase from the Australian iTunes Store while visiting Spain. There's nothing preventing you from doing so. So ordinarily there's no reason to switch iTunes stores when travelling in a different country on holiday.

There are drawbacks when changing country on your Apple-ID, such as for example ahving to deal with subscriptions, store credit and/or payment methods requirements of either store.