Security - tchncs

I’m literally trying to get into Linux and one of the first things was installing software, which involves copying and running random bits of code from whatever website has the highest search result. I would say a lot of software is running code you have no idea what it does.
Installing software on Linux almost never involves “copying and running random bits of code” unless you have a need for some really obscure program. Learn how to use your distribution’s package manager.

Learn how to use your distribution’s package manager.

Also

sudo apt update

sudo apt upgrade

covers what, about 60% of Linux desktops?

And sudo apt full-upgrade when a new OS version is available.

full-upgrade is the same as upgrade except it’ll remove old packages if required. (e.g. programs that don’t support the new version and hold back the upgrade due to old dependencies). When upgrading Debian to a new release, I usually first run upgrade, then run full-upgrade and read the output very carefully before continuing.