In Python, indentation controls what code is part of what block: all the contiguous code at a particular indentation level is part of a block, and any lesser indentation ends that.
As a result, your
if x > screen.get_width()-90 or x <0:
loop above it meaning that the loop consists only of this code:
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
x = x + x_speed
does not change inside the loop unless the user exits, and the loop does nothing else at all until that does happen, the screen remains blank.