How to get rid of the warning “Your computer was restarted because of a problem”

I’m searching to find a solution to get rid of the banner warning every time I boot to my macOS High Sierra.       The solution is to format and reinstall macOS High Sierra on the partition.