It is not sufficient to call pygame.display.update(), you've to handle the events, too (e.g. by pygame.event.pump()).
Further I recommend to use pygame.time.wait() rather than time.sleep(). Be aware that the time unit for pygame.time.wait() is milliseconds.
def display_gameover():
pygame.font.init()
font = pygame.font.SysFont(None, 100)
text = font.render("GAME OVER", True, red)
extRect = text.get_rect()
screen.blit(text,(screen_height//2, screen_width//2))
pygame.display.update()
pygame.event.pump()
pygame.time.wait(2000) # 2000 milliseconds == 2 seconds
Furthermore you've to ensure that the Surface which is associated to the display is initialized (pygame.display.set_mode()).
This means if pygame was terminated by pygame.quit(), then it has to be reinitialized by pygame.init() and screen has to be set by pygame.display.set_mode() before the call to display_gameover().
Alternatively don't terminate pygame.