These words are considered interjections, and they don't require a comma unless they are followed by a direct address, like a name.
Here are some examples:
Without comma:
* Congratulations! You did it!
* Welcome to the team!
With comma:
* Congratulations, Sarah! You won the award!
* Welcome, everyone, to the party!
Let me know if you have any other grammar questions! 😊