I want to make a command block that detects water blocks anywhere in my world, and then replace it with ice, but I don't know how to detect blocks without testing specific coordinates one by one. For example, this won't work because I have to repeat for every single coordinate I want to test:
/execute if block 12 23 34 water run setblock 12 23 34 ice
I also want it to detect blocks everywhere without being restricted by distance from the player or other entities.