RFK Jr wrote the forward to an anti-vaccine propaganda book, “The Truth About COVID-19: Exposing the Great Reset, Lockdowns, Vaccine Passports, and the New Normal." Senator Warren wrote a letter to Amazon expressing her concerns that Amazon was profiting off of anti-vax pseudoscience and conspiracies. Amazon then notified the publisher that it would no longer be promoting the book, but the book remains for sale on the Amazon website.
In response to this, RFK Jr started a lawsuit against Senator Warren alleging that she had used the force of government to prohibit Amazon from promoting the book. That lawsuit has been dismissed by the Ninth Circuit
Yes, that was the court's main reasoning for dismissing the lawsuit. Basically, politicians are people too and have the same right to have opinions as anyone else.