It is very important for us to recognize that at the writing of Galatians, the world was going through a transition.
It was the ending of the old covenant and the beginning of a new covenant. Jesus’ death brought an end of that form of righteousness that came from obeying the Law of Moses.
The old covenant began fading away after the cross. That transition continued for 40 years and eventually ended when the Temple and Jerusalem destroyed in AD70 effectively putting a full end of the age of the Law.
When Christ died on the cross, he ushered a new form of righteousness which was a gift. It did not however fully manifested itself yet.
It only fully established itself when AD70 shut the door of the Old Covenant and open fully the New Covenant.
That’s when the age of the righteousness that grace brought in had fully come.
As such Paul is not saying “we are yet to be righteous.”
Rather it speaks about awaiting an era of everlasting righteousness.
We are now in that era.
31 They will proclaim his righteousness
to a people yet unborn –
for he has done it.
“It is finished!”