I must have run an "rm -rf *" command in my root file system (noob mistake I know) as all my files and apps on my mac were deleted, but the computer was still functioning. I've continued working on the mac, and noticed there is no /System/ folder, so I'm thinking maybe I deleted the system folder. Is there a way to restore the file system but keep the apps and files I'm working with?
You can boot into macOS Recovery by pressing Cmd-R at startup, from there you can reinstall macOS. This should leave your files intact, it's nevertheless not a bad idea to do a backkup first.