This is one that I've come across on old Macs when trying to restore them. Usually, it's because the date has reset to January 2000 or the clock is working as expected, and the date is too far in the future. Long story short, it's a certificate issue.
When you're in the utilities, go to Utilities > Terminal.
Type in:
date 052621332020
This is May 26, 2020 at 9:33 PM. Because Apple is a west coast company, the time will be PDT. If you find out that setting the date current doesn't work, try setting the clock further back because it means the installer certificate is expired. Setting the clock back makes the cert “valid” again.