The trilobite was about to die.
It wouldn't have died so early. As one of the few dominators of the Cambrian Ocean, there were few creatures larger and more ferocious than it in the primitive and chaotic ocean. Even if it encountered a strong enemy, its solid shell was enough to provide enough protection. Besides, near the ancient corals where it lived, there were all kinds of food such as sea lily, sponges, gastrointestines, and plankton. It was quite abundant.
If it wanted to, it could have continued swimming in the seawater comfortably, hunting plankton, and living a life exactly the same as its billions of companions. Its structure and the rules of operation of the world determined that its species could live hundreds of millions of years in peace in such a form, at the very least, so that it would not be killed by a global extinction.