Does anyone know how to build a basic ticket system? Specifically, how to close one

Everything else is pretty simple, but how do you store the button ID for the close button, so that if multiple tickets are made at once, each can still be closed?

there will be one on the new library

WHEN is it coming lol

Pretty soon