If you’re a user interacting with a terminal => apt
If you’re writing a script or putting it in a docker file/automation => apt-get
Apt is just a wrapper around apt-get a newer binary than apt-get (I stand corrected after checking my memory against google) and there are warnings that the apt shorthand is not as reliable in scripted scenarios. Its meant for user convenience.