I don't want to presume to get into the translator's heads, but I'll suggest what I think they're up against. This is why I wish translators would publish a companion book (set of books) to their translations that would answer all the "why did you translate Χ as Y" questions. The Tower of Babel incident made sure that translation is complex, so translation choices of the sacred text need explanation.
I think the issue is Paul's use of the verb μέλλω. For μέλλω, the LSJ has, in part:
to be destined or be likely to, indicating an estimated certainty or
strong probability in the present, past, or future
So, there's a hint of contingency in the main verb. The YLT tries to bring out this contingency with its translation "it is about."
Also, one can notice in the OP there are not only differences between the two translations relative to the single word if, but also with the words that lead up to the if clause. The translators appear to have wrestled with how the dative participle interacts with the main verb and the dative personal pronoun (οἷς). If they change how to translate the participle, they have to change how to translate the previous phrase, and vice-versa. The wrestling is quite rational, to say the least. Anyone can see this wrestling by comparing several translations. That is, different people made different choices all seeking to accomplish the same thing.
So, while μέλλω is the main verb, the dative participle, τοῖς πιστεύουσιν ("those who believe"), modifies it. These different pieces, especially as they interact with each other, are a bit of a challenge to get the mind wrapped around. The original Greek obviously can't mean that the obtaining of righteousness is only a possibility. That would completely obliterate Paul's whole argument. Paul states pretty clearly that Abraham certainly obtained righteousness, but he's just as clear that the obtaining was based on something. That's his paragraph level point. So, there's this interaction between the certainty of obtaining righteousness and the contingency of belief. These two elements form a semantic whole that has to be rendered in English. The Greek whole has meaning; the English whole has to strive to convey that same whole meaning.
How to do that is the question. And different translations have tackled this problem differently.
NIV: but also for us, to whom God will credit righteousness —for us who believe in him who raised Jesus our Lord from the dead.
Note that I’ve bolded the emdash—it’s part of the translation of the participle. The NIV uses 'will' to convey the certainty and the 'emdash' to convey an emphatic contingency. That is, the crediting of righteousness is not for anyone; it's for "those who believe."
NLT: for our benefit, too, assuring us that God will also count us as righteous if we believe in him, the one who raised Jesus our Lord from the dead.
The NLT uses 'assuring' to convey the element of certainty, but uses 'if' to bring in the contingency.
NASB20: Now not for his sake only was it written that it was credited to him, but for our sake also, to whom it will be credited, to us who believe in Him who raised Jesus our Lord from the dead
I've had to include verse 23 because the NASB doesn't convey very well that the "to us who believe" modifies "it will be credited". For me, the "to..." phrases sound parallel, as if it's all about what is written. And that's confusing to me.
Interestingly, the YLT (see the OP above) doesn't convey the certainty of obtaining righteousness as well as the less literal translations. It appears to push it off into the future. I think that goes against Paul's point.
So, translators are up against how to balance the phrase οἷς μέλλει λογίζεσθαι ("to whom it will certainly be credited") with the participle, τοῖς πιστεύουσιν ("that is, those who believe") that modifies it. As I see it, using 'if' is one possibility. But, that requires some care on how one translates the previous words that lead up to the participle.