There is plenty of good generic advice about walking in hot conditions on the web.
Here is one from Queensland, Australia, and another
here from the (US) ABC. Search for 'walking in the heat' or some similar term in your favourite search engine.
In camino specific terms, avoiding the heat of the day often means starting pre-dawn and aiming to finish before the middle of the day. I prefer to start later and manage my hydration, pace and rest stops to compensate for the heat. I also walk regularly in the heat here in Australia during the summer, and make sure I am familiar with the signs of heat stress. It is important to know when to just stop, not for a few minutes but much longer, to give yourself the break you need.
Diet is also important, and perhaps more difficult to address in Spain and Portugal where bread and farinaceous dishes feature much more in the pilgrim menu that they do where I come from. I take care to buy fruit each day, including a banana. I normally do this at the end of the day so I can consume some when I have stopped for the day, and some the next day. I will carry an orange for a mid-morning snack, but don't normally carry soft fruits like bananas and stone fruits in my pack during the day.
I also carry rehydration tablets or sachets. and make these up at the end of my walk. If you are going to consider other supplements, I suggest consulting your GP about whether this is useful, what supplements might work to address any specific conditions you have, and whether there are known interactions with any of your other medications.