Heinlein’s novel was much better than the movie.
From what I recall, the director and/or producer never read the book and at least one of them was proud of that. The movie director also wanted to lampoon Heinlein's vision of a militarized but united Earth. He could have done that by combining more meaningful themes from Haldeman's "The Forever War" which was written explicitly as a response to "Starship Troopers." (Notably, Haldeman also praised "Starship Troopers," he just disagreed with it after his experiences in Vietnam. That would have been an amazing and powerful movie.
Instead, Hollywood gave us an angsty 8th grader's "my teacher told me to think that war and soldiers and pride and discipline is bad so let's make fun of it when people die."