Would someone give an explanation of how to modify the data of a fox?
The Age
tag represents how many ticks the mob has until it grows up (if it's a baby) or how many ticks until it can breed (if it's an adult). Therefore, baby foxes can have any less than 0, not just -1.
As you cannot directly check if an NBT tag is greater/less than a value, you need to store the Age
in a scoreboard first:
/scoreboard objectives add age dummy
/execute as @e[type=fox] run store result score @s age run data get entity @s Age
Then you can select the first fox with an age ≤ -1:
execute as @e[type=fox,limit=1,scores={age=..-1}] run data merge entity @s {Age:1}