How to save the log of the commands run in the terminal?

Good morning

How to save the log of the commands run in the terminal?

example .:

I have a command that performs some function when called via terminal, but I wanted to save the log when this command was called.

Thanks

OBS.:

I am Brazilian and I am using Google translator, so sorry if there are any errors.