Linux
On a Linux machine, first check if the terminal window has a menu item that allows you to Export As Text. If so, then simply use that to create a text file.
Otherwise, open a gedit (or any other editor you prefer) separate
window by typing the command (the ampersand is important)
gedit &
The using the mouse, select the entire content of the terminal, or
from the Edit menu, choose Select All. This should copy the text, but
if it doesn't work, the Edit menu should have a Copy item. Paste it
into gedit with Ctrl-V. Save it under the name you want for it.
MacOS
On a MacOS system, locate the Shell menu at the top of the screen
(not of the terminal window) and then do Export Text As... Save the
file under the name you want.
Windows
On a Windows machine under Putty, before you open the connection, under the Settings go to the Session at the top and click on Logging. Enter a file name and click on the Browse button to select a folder to save it to. Check the option for Printable output. Then you can open the connection as usual. Once you close the Putty terminal, you will find the file saved in the folder you selected.
If you haven't turned on the logging, at the end of the session or from time to time click on the Putty icon in the top left corner, and choose Copy All To Clipboard. Then open a simple text editor like Notepad++ (do NOT use Word) and paste the content in a new file. Save the file under the name you want.