Either this is a problem you interjected that affects macOS or the computer needs repair. For the latter make an appointment at the Apple Genius Bar for service. If you need to find an Apple Store - Find a Store - Apple. For the former:
Install El Capitan or Later from Scratch
If possible backup your files. The following will erase everything.
- Restart the computer. Immediately after the chime hold down the CommandandRkeys until the Apple logo appears. When the Utility Menu appears:
- Select Disk Utility from the Utility Menu and click on Continue button.
- When Disk Utility loads select the volume (indented entry, usually Macintosh HD) from the Device list.
- Click on the Erase icon in Disk Utility's main window. A panel will drop down.
- Set the Format type to APFS (SSDs only) or Mac OS Extended (Journaled.)
- Click on the Apply button, then wait for the Done button to activate and click on it.
- Quit Disk Utility and return to the Utility Menu.
- Select Install OS X and click on the Continue button.
This will install the version of OS X you had installed.