Das Beste haben wir uns bis zum Schluss aufgehoben.

I’m trying to understand the logic of this. “aufheben” means to pick something up, correct, and it can be used in this sense, like picking up objects from the floor? And as such it also means to pick it up and set it aside, presumably for use later? So then it also is used in the metaphorical sense of saving something for later? But I also see it used in very different idiomatic ways, such as to “set aside” something and make it void, or nullify, repeal, or suspend something, like a regulation, rule, or law? Or a higher court overruling a lower court?