To keep a secret
The natural collocation for keeping a secret. Guardar un secreto = to keep a secret. The opposite is revelar un secreto or contar un secreto.
Can you keep a secret?
She kept the secret for years without telling anyone.
—Will you tell him? —No, I know how to keep a secret.