This is no "issue", just a misunderstanding ;)
The field
public int currentAge;
is serialized.
What this means in detail you can read in Script Serialization. In short this means this value is
- visible/editable via the Inspector
- saved together with the according asset (ScriptableObject/prefab/scene)
- loaded during the initialization and deserialization process
What you can provide in your code is only a default value until you change it via the Inspector. As soon as you change that field value via the Inspector it will get overwritten with this now serialized value. So the next time you hit Play and this script instance is deserialized from the according asset file the value will be loaded and overwrites any default value you have set in your code.
And of course changing the serialized field value will NOT cause a recompilation of your script. You will not see the change reflected in your script! Which makes totally sense: What should happen if you have multiple instances of this script on different GameObjects all with different values? ;)
Also the other way round: If you change that value later in the code you only change the default value, the one in the Inspector, the serialized one will always overrule it.
There are some(?) IDEs (I only use Rider) which are capable of sniffing into the Unity references and asset values and can tell you with what value certain serialized fields are currently serialized/saved with but usually you can only go by what is either set in the Inspector or in the Unity messages like Awake, Start, OnValidate etc.