Universal Translator translates everything?

I’m watching Voyager for the first time but this applies to any show.

Some new alien of the week just beamed on board and Janeway and Chakotay are greeting them. Of course we hear everything in English but we imagine they are speaking different languages (which I don’t know how the translator can translate a brand new discovered language, or work for the aliens).

Chakotay greets the aliens and then says something in his Native American language (yes that’s a whole other thing) and then translates it into English for them.

What’s happening here? Did he just say the same phrase twice from their perspective and then explain it? Eg: ‘good morning, which means good morning in my language’. How would the translator handle this?

Edit: holy hell you all came through with responses. I’ve never had so many to a topic anywhere. Thank you. I know it’s a plot device and all but I like to think about it. When I was a kid we discussed how doors might open on their own like in TOS and were told it was just space magic.