Why bash history on my mac won't save?
I did this:

Add a variable to .bash_profile file

SHELL_SESSION_HISTORY=0

restart the terminal and after that it is working as I'd like. (It saved the commands after I closed the terminal)

P.S. I also use the HISTFILESIZE and HISTSIZE variables

HISTSIZE is the number of lines or commands that are stored in memory in a history list while your bash session is ongoing.

HISTFILESIZE is the number of lines or commands that (a) are allowed in the history file at startup time of a session, and (b) are stored in the history file at the end of your bash session for use in future sessions.