Trilobites were around for some 300 million years, declining slowly through the Devonian and with the final order disappearing in the Permian extinction. Some tie their decline with jawed and semi jawed fish able to crush their protection. The last order liked shallow water. We still have their relation, the horseshoe crab.
No one thing or time period can be said to have caused their extinction, rather it was likely many things over may millions of years. Scorpions, jellyfish, sea pens, corals, sponges, etc. all have survived from the time their ancestors lived alongside the trilobites.
Mental gymnastics.