"Boomer" is an insult that directly references a protected characteristic, as such it's not only insensitive to use in the workplace, it's illegal. You'd be well within your rights to report this to HR, though I wouldn't recommend that in most cases. At the very least it's worth bringing this up to your manager if it happens repeatedly, phrase it as wanting to protect the company.
Maybe note in writing somewhere that this happened in case you get laid off and need some negotiating leverage to get a better severance. Email to yourself can work well, then it's discoverable.
It isn't illegal, in the sense that no one will be arrested for saying it.
As I recall, it's a bit more subtle. If the workplace continues to allow discrimination based on a protected characteristic then it will be considered a hostile workplace, which is illegal.
Age is only a protected characteristic for people 40 years old or older, which is every member of Gen X.
This presumes that le-mark's account took place in a workplace. On Twitter, about 6 years ago, a millennial wrote “Ok Boomer” to William Shatner, who replied “Sweetheart, that’s a compliment for me”, as Shatner, born in 1931, would have been in the Silent Generation.
Maybe note in writing somewhere that this happened in case you get laid off and need some negotiating leverage to get a better severance. Email to yourself can work well, then it's discoverable.