New to terminal command line; trying to run '$ gem install iStats'

The quick answer is if something tells you to use su it is probably wrong unless you fully understand why you are using it.

In this case ruby is set up so that gems are written to a directory /Library/Ruby/Gems/2.6.0 that needs root permissions to write to. Thus you get the first error.

You can install the gem by running

sudo gem install iStats

You will be prompted for your own password (su prompts you for the password of the user you are changing to which without any other arguments is root - which on macOS by default does not have one and you cannot use root. Which explains why you could not provide the password for su as you don't know it.)

I would note that if you are doing much Ruby work you should look at rbenv or similar to allow gems to be installed without sudo and allow different gems for different projects.