Which size computer do you have?
27": YES! First make sure you have a backup, then go ahead and update to a newer version of MacOS.
21.5": UPGRADE RECOMMENDED. The baseline 1TB 5400rpm HDD option is too slow to effectively run 10.11 and newer. The easiest upgrade is to just use an external USB 3 SSD (Link for Guidance). Once you have an SSD (or if you opted for a Fusion drive at time of purchase) double check your backup is up to date and update to a newer version of MacOS.
I'd suggest High Sierra (10.13) https://support.apple.com/en-us/HT208969
That's the oldest version with current security updates, and the least likely to cause compatibility issues with your current/(old?) software.