You didn't specify that OS you were using, but note that gcloud CLI doesn't actually include an ssh client. It just uses the system-provided ssh client, and it provides a front-end interface to that ssh client. So for example, on a linux system, you can use the --dry-run option to see that "gcloud compute ssh xfstests-ltm" actually runs the command:
% gcloud compute ssh --dry-run xfstests-ltm
/bin/ssh -t -i /home/tytso/.ssh/2021/gce-2021 -o CheckHostIP=no -o HostKeyAlias=compute.3698096746542602258 -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/home/tytso/.ssh/google_compute_known_hosts
ty...@35.185.71.47
Similarly, in terms of the scrollback window (which is what I think you are talking about), that's controlled by whatever terminal window that you are using. On a Linux GNOME or KDE terminal, you can adjust the scrollback window size, via a settings page. For example, for KDE's terminal (Konsole), you go to the menu bar, select "Settings", then "Edit Current Profile", then select "Scrolling", and you can configure the scrollback size some number of lines, or "Unlimited", with the warning: "the scrollback data will be saved to RAM. If you select a large value, your system may run out of free RAM and cause serious issues with your system".
The above reply seems to assume that you are using a Windows system, and it appears that the Windows-provided "cmd" terminal window may not provide a way to adjust the scrollback size. But the "putty" client, which opens its own window, does, and that's what the linked instructions are referencing.
You seem to have expressed some confusion about what a "cloud shell" might be. So there is a feature in the GCE Console (the web page interface), which allows you to open a Browser window that acts like a terminal, and it starts a very tiny VM in your current GCE project. From that tiny VM, you can ssh into VM's in your project. This is super-handy if you need to access a VM in a hurry, but it's a very limited environment. In particular, since the "cloud shell" window is really a Browser popup window, commands to close a browser window will affect the "cloud shell" window. It doesn't have a scrollback feature at all. I view it as an emergency measure, when I don't have access to my standard Linux development laptop; since if I do, I'll generally issue the "gcloud compute ssh" command from my KDE terminal window, which is a much more fully-featured alternative.
Cheers,
-- Ted