It would run an alarm clock /time lock set up to send a signal or switch on a servo operated lock after 10 years. I don't know specs or power need for servo, might be separate system (and a separate question) . Focusing on the power requirements to operate a raspberry pi zero w continously for 10 years in an enclosed system with no possibility to swap or recharge the battery for the given period. Edit : the initial system would low power idle until given time and date without any led or displayed output. It would then send a signal or current to servo lock mechanism to unlock and power down or idle when task is completed.
According to raspi.tv, the idle current is 120mA. Sizing the battery for 10 years:
That would be an enormous battery. Based on this tomsguide.com article, a Moto G7 Power has a 5 AH battery, so you'd need the equivalent of 2,104 Moto G7 Power batteries to provide that much power. That's not even accounting for any other power loss the battery may suffer, and you'd need a battery with a shelf life greater than 10 years.
In case the cell phone battery count wasn't impressive enough, based on this calculator, that'd be a 54.595kWh battery. In other words, you would need more capacity than that of the high voltage (drive) battery in a Tesla Model 3 SR according to this Wikipedia page, which references this archived Electrek article.
As you only require it to do a one off tigger in 10 years I would have thought a very low power microprocessor with a deep sleep mode would be the way to go.