Please don't place information about the story format within the Question's Title, it just pads the title and serves on real purpose if you have correctly tagged your question. (like you have).
You haven't included the TwineScript that shows how you are displaying the initial Stats values, but based on the fact you are passing a ?str hook name to your (replace:) macro I will assume that you have have marked the values using named hooks.
If so then your code should work as demonstrated by the following example.
(set: $str to 10, $statchoice to 10)
Strength: [$str]<str|
(link-repeat: "Strength + 5")[{
(set: $str to it + 5)
(set: $statchoice to it - 1)
(replace: ?str)[$str]
(if: $statchoice is 0)[
(goto: "CharacterDev5")
]
}]
I don't know if you will need to update multiple stats at the same time but if you will then I suggest abstracting the displaying of the stats to a child Passage and then using a (replace:) macro to update all the stats at once.
1. The Stats passage
Strength: $strength
Stamina: $stamina
Agility: $agility
2. The passage with the (link:) that changes the stat values.
{
<!-- The following intital values would actually be assigned in your story's startup tagged special passage, but for demostration purposes they are done here instead. -->
(set: $strength to 10, $stamina to 10, $agility to 10)
}
Stats:
[(display: "Stats")]<stats|
(link-repeat: "Do weigh training")[{
(set: $strength to it + 5)
(set: $stamina to it + 2)
(replace: ?stats)[(display: "Stats")]
}]