OK, a couple of things:
1. Your Mac can run both High Sierra (OS 10.13.6), and the next Mac OS, OS 10.14, Mojave. These links describe which Macs can run each of those:
High Sierra:
https://www.google.com/search?q=Mac...rome..69i57.7381j0j1&sourceid=chrome&ie=UTF-8
Mojave:
https://www.cnet.com/how-to/here-are-the-macs-that-will-work-with-macos-mojave/
2. You are taking quite a "leap" on updating your Mac OS, from OS 10.7.5 to OS 10.13.6 (High Sierra), or OS 10.7.5 to OS 10.14.x (Mojave). With such a leap, it would be best if you do a clean installation of the newer Mac OS. For that, you'll need some "tools", along with making backups.
3. 13 Gig out of 170 gig is not much free space. How are you using all that space? It might be wise to either 1) do some serious disk cleanup on your own, or 2) install a large drive inside your machine.
OK, for some software suggestions:
1. Do as much disk cleanup on your own as you can. One place to look is your downloads folder.
2. Backups: First, of course, you'll need to purchase an external drive. If you use a traditional hard drive, a 1 TB should be easily big enough. If you want to use an SSD (faster, but more expensive), a 500 gig/512 gig model should be enough. Second, software for backing up: The Mac OS comes with Time Machine for backing up. It is "OK", but it is not bootable. Given that it will be best if you do a clean installation of whatever Mac OS you upgrade to, it would be best if you use either SuperDuper!:
https://www.shirt-pocket.com/SuperDuper/SuperDuperDescription.html)
or Carbon Copy Cloner:
https://bombich.com/
Each makes a
bootable backup/clone of your "system". So, you will be able to boot your Mac from that external backup with either of them. I use SuperDuper!, and I could not live without it! But there are other folks who "swear by" Carbon Copy Cloner. The differences between them is 1) Cost: SuperDuper! costs $27.95, and Carbon Copy Cloner costs $39.95, 2) Carbon Copy Cloner backs up the (hidden) Recovery HD partition (mentioned below), whereas SuperDuper! does not. For myself, that is not a detriment. Also, when you do a clean installation of the Mac OS, it creates that partition for you.
3. Here are some excellent freeware tools you can use:
Onyx - Available from here:
https://www.titanium-software.fr/en/onyx.html
Rock Solid, has been around a long, long time, and has had many positive reviews. I use it religiously (along with a commercial program entitled Tech Tool Pro). I would not be without either of them. In fact, I will not upgrade to a new Mac OS until there are compatible versions of both of them for the new OS (along with 4 other critical programs that I have). Note that there are different versions of Onyx available, for each different Mac OS. You would need to get the correct version for the Mac OS you are using.
AppCleaner - Available from here:
https://freemacsoft.net/appcleaner/
Another stellar performer! As you can see via that link, it will get rid of most stuff associated with an application that you wish to delete.
GrandPerspective - Available from here:
http://grandperspectiv.sourceforge.net/
Nifty graphical way to see which files are on your drive. Good way to identify large ones that you might not need.
Malwarebytes - Available from here:
https://www.malwarebytes.com/mac/
Good to use if you see adware and/or suspect you might have a virus. It also is good to run it every so often, even if nothing is wrong.
ClamXAv - Available from here:
https://www.clamxav.com/
More extensive than Malwarebytes in terms of finding viruses. You can use it in demo mode, and it still has just about full functionality.
Then of course you can use Disk Utility to check out your drive and/or do repairs. It's not as extensive as Tech Tool Pro (
https://www.micromat.com/products/techtool-pro), Disk Warrior (
https://www.alsoft.com/diskwarrior/?gclid=EAIaIQobChMI9qzeqcSF2gIViWp-Ch0NngwsEAAYASAAEgJg7_D_BwE), or Drive Genius (
https://www.prosofteng.com/drive-genius-mac-protection-software/), but it gets the job "mostly" done. I use Tech Tool Pro, and in fact it is the only third party one so far that is fully compatible with High Sierra (that's the OS I use on both of my Macs)
However, you need to run Disk Utility in "isolated" mode. For that, you would boot your Mac into the (Hidden) Recovery HD partition. This link explains how to do that, and what is on that partition:
https://support.apple.com/en-gb/ht201314
Finally, again it is important for you to make a list of what third party software you use.
For this project, you will need to do the following:
1. Do as much disk cleanup on your own. If you can't get that much more free space, consider installing a larger drive inside your machine.
2. Purchase an external hard drive.
3. Download the new Mac OS for the Apple Store. High Sierra is there now, but Mojave will not be there until the fall.
4. Decide which backup software you want to use. You can use both SuperDuper! and Carbon Copy Cloner in demo mode. They still will have full functionality. Again, I would strongly recommend either SuperDuper! or Carbon Copy Cloner. In fact, it might be wise to purchase either one.
5. Download as much of that free software as I mentioned above. At a minimum, you will need Onyx and AppCleaner. But all the other products are excellent.
Let us know when you are ready, and/or if you have more questions.