When Finn meets Chewie, he's astounded that Han can understand him - and I can see where he's coming from: it all sounds the same to someone who didn't grow up with those phonemes, i.e. we can't tell where one meaningful sound-unit ends and another begins. But in Rise of Skywalker, Finn is shown replying to something Chewie said, i.e. he seems to have managed to learn enough of the language to understand it. There wasn't that much time between the movies, was there? How did Finn learn such a difficult language in such a short amount of time?
Vanity Fair reported in their The Rise of Skywalker preview that the gap between the two movies is "about a year." Assuming that was based on conversations with producers and is likely accurate*, that's still more than enough time for someone to pick up the rudiments of a language.
Here's some relevant reporting from the BBC:
Such immersion is also actively encouraged at the Foreign Service Institute in Washington, DC, which trains US diplomats and US foreign affairs personnel in foreign languages. With teaching expertise in more than 70 foreign languages, courses last up to 44 weeks, with the aim of taking students to 'level 3' in a language — essentially this means they can read and understand the equivalent of a magazine like Time and hold in-depth conversations.
Getting to basic conversational proficiency can be achieved in much less time, just several weeks according to experts, particularly if you can speak regularly. James North, associate director for instruction at the Foreign Service Institute, said students are encouraged to get to know native speakers.
So if Finn spent a year or so working closely with and learning from Chewie, it's believable that he would be able to understand a single sentence in a foreign language and respond in his own language. And while he initially seemed shocked that Han could understand Chewie, at the time he was accosted by a giant roaring monster with a gun in his face ("You understand that thing?" were his exact words). Enough humans are shown to be able to speak and understand the Wookiee language that it can't be that difficult for them to learn once they're open to the idea.
*And this is all assuming the one-year gap is accurate. I don't recall that being made explicit in the film. We could just as easily assume the gap is three years, or five, or even ten if that helps believability.
In the intervening time since we last checked in with the rebellion's golden trio, they've all been pretty busy. Poe has become a general and is now coordinating military activities, Rey has been training as a Jedi and Finn has been immersing himself in the study of weapons, tactics, leadership and languages.
Finn's stormtrooper training has provided the Resistance with inside information and firsthand intelligence on enemy forces, but his lowly rank and strictly defined role within the First Order hindered his own development.
The Resistance, however, needs everyone to excel beyond their boundaries to win this war. Therefore, Finn is actively developing a wider range of skills - he devotes himself to learning more about leadership, piloting, languages, and other areas. He has also shown a cautious curiosity about the Force. Finn is astounded by the feats Rey has performed, and wishes to gain some insight into something that is clearly deeply important to her.
This evidently includes learning conversational Wookiee.
I think TenthJustice's answer sums it up really well. One thing I think we can also consider is that throughout the EU and Legends canon and video games, those who were Force-sensitive sometimes had a knack for understanding alien languages or droid-speak.
More than anything, I think it's probably immersion that provided the most benefit for Finn. However, considering the current discussions around this question I think its worth mentioning that if
Finn is Force-Sensitive
There's a good chance this supplemented his ability to converse with Chewie.
Here's a link to some examples of this ability.