Each coding language has their syntax or structure. Python is very structured around indentation to show placement within a code. Think of it like a structured list like below. You know that the main topic is in line one with the subtopics.
Python uses indentation to know what code fits in what groups. When you use a certain type of code, it needs to know what code to run specifically for that group. Loops and If statements are a primary point for indentation. If the indentation is not correct, the code won’t run the way you expect.
#everything indented at this level will keep running in the loop
if this is true:
then do this because it is indented after the if statement
do this if the first check is not true and indented after else
#not indented with the while True loop so it won't run unless you break out of the loop