Your passage is mostly clear, but there are a few grammatical issues and some repetition that can be addressed for improved clarity and flow. Here’s a revised version:
The Ceratosaurus would often fight other dinosaurs in its habitat, usually to defend its territory. As a fierce carnivore, it is believed that ceratosaurs hunted in packs, which provided them with an advantage in taking down larger prey. This group behavior not only aided in hunting but also helped protect them from threats posed by other dinosaurs. Additionally, the front horn of the Ceratosaurus was used for combat with other dinosaurs and for attracting a mate.
Changes made:
- Combined phrases to avoid redundancy (e.g., "advantage in hunting" and "protecting each other from other dinosaurs").
- Clarified the purpose of pack hunting and the horn without repeating the word "fighting."
- Made slight adjustments for better flow and readability.