To stop your PS5 from automatically taking screenshots when you earn trophies, go to Settings > Captures and Broadcasts > Trophies and turn off Save Trophy Screenshots. You might also want to turn off Save Trophy Videos.