Yes, registrars reserve the right to take away your domain for essentially any reason, as we recently witnessed with codeberg.org[1]
You can of course reduce the risk of this happening to near zero by never hosting anything they might consider objectionable, but it's never truly zero.
[1] https://news.ycombinator.com/item?id=50544261