An ability is the special game text a card contributes to the game.
Unless an ability explicitly references an out-of-play area (such as a hand, deck, archives, or discard pile), that ability can only interact with cards that are in play. Abilities that interact with a card after it is destroyed can interact with that card while it is in an out-of-play zone that is not hidden.
Abilities on a creature, artifact, or upgrade are only active (and can only be resolved) while that card is in play, unless the ability explicitly references being used from an out-of-play area. Once an ability on a card has started to resolve, that ability will finish resolving even if the card leaves play.
If resolving part of the instructions of a card ability causes other card effects to begin to resolve, resolve those other card effects before continuing to resolve the instructions of the first card.