Terminal.app hasn't changed all that much since 2012. At least not in any way that would be a major impediment for using a book from 2012. See details below.
Some of the commands have more options or more features, but you can always find out the details of the current command by using the 'man' command to show its man page. For example, the 'ls' command's '-@' option was pretty new in 2012, so it might or might not be covered in the same detail by a book published in that year. The '-@' option is for listing extended-attributes (xattrs). The scope of xattrs has expanded since then, notably they're used to store the tags that you add to files in the Finder.
Individual commands may have later versions now than they did in 2012, for example, ruby or python. Sometimes the older version, such as the earlier 'python', remains available as 'python' for compatibility reasons, while newer versions are available as number-suffixed commands, such as 'python2.5'. Again, the man page will generally tell you this, or you can simply apply the 'ls' command to the dirs where commands reside, as listed in the PATH variable.
The 'defaults' command is essentially unchanged, although the list of names used by other apps has definitely changed. Many names that were used then are no longer used, so setting their values has no effect. A website is the best way to stay on top of those:
https://www.defaults-write.com/
Learning Unix for OS X: Going Deep With the Terminal and Shell
by Dave Taylor (Author)
I looked at its TOC on the OReilly website, and only X11 strikes me as potentially problematic. It was an app residing at /Applications/Utilities/X11.app in the 2011-2012 era, but I think it was removed or made optional in a later Mac OS version, but I don't recall which one.
There's this, found by googling
macos x11 :
https://support.apple.com/en-us/HT201341
Macintosh Terminal Pocket Guide: Take Command of Your Mac
by Daniel J. Barrett (Author)
Again, the TOC on the OReilly website doesn't list anything I would say is significantly different. I didn't go through every command, though, just the topics listed.