Looking back at Star Trek history, the death of Spock seems superfluous. The infamous scene occurred at the end of Star Trek II: The Wrath of Khan and Leonard Nimoy went on to play Spock in six more films and The Next Generation. But none of those other appearances would have happened if Spock hadn't died in The Wrath of Khan.
Source:https://www.cbr.com/spock-death-star-trek-wrath-of-khan/