The "allow apps downloaded from" setting won't stay selected
Since this is a new Mac and nothing was working anyway, I decided I had nothing to lose by wiping it and starting over. So I restarted it and held down Command + R. From the menu I selected to reinstall macOS. After waiting 40 minutes I was disappointed to see that this option did not wipe the drive, and my restored accounts were still there on the login screen. I was about to restart again and this time format the drive, but I thought What the heck, and logged into my account. Surprisingly none of the files I opened were reported as damaged! Everything seems to be working now.