*Star Trek* (2009), *Star Trek into Darkness* (2013), and *Star Trek Beyond* (2016) occur in an alternate timeline / reality - so there are two different Spocks. "Old Spock" is from the 'original' timeline and has journeyed via artificial black hole to an alternate universe.

> The alternate reality was a new reality created when a temporal
> incursion caused by time travel of the Narada, a Romulan mining vessel
> from the year 2387, disrupted the time continuum. Accidentally
> traveling back to the year 2233, Nero, the Narada's captain, attacked
> the USS Kelvin. The attack resulted in the deaths of several crew
> members of the Kelvin, including George Kirk and Richard Robau, and
> the destruction of the Kelvin itself. Spock arrived to the alternate
> reality in 2258 and was captured by Nero, who used red matter to
> destroy Vulcan. However, Nero's attacks united the crew of the USS
> Enterprise, who foiled his attempt to destroy Earth. (Star Trek)

https://memory-alpha.fandom.com/wiki/Alternate_reality

If you are familiar with the [Mirror Universe][1] from TOS and DS9 - it's the same kind of concept (although, a different alternate universe)


  [1]: https://memory-alpha.fandom.com/wiki/Mirror_universe