How to make a loop of nested if-statements to find the smallest number of something?
I'm not sure what your code is doing. As it currently stands, it will print the first number that satisfies the requirement of being composed of various parts, all divisible by 5 with a remainder of 1.
If that is your objective, then you should certainly compute the number as an equation: (0*5)+1 *5 ... etc.
If you are working up to determining whether any given number meets the condition, then you can certainly continue as you are doing.
Here are some tips to improve your efficiency and clarity:

Get rid of the continue at the bottom of the loop. It is not needed.

Get rid of the various statements getal = getal + 1 in your else branches. By inspection, I can see that this adjustment is always done whenever you loop (since you sys.exit() on success) so just move the statement to the top of the loop, and adjust your incoming variable:
 getal -= 1
 while True:
     getal += 1
     # many, many if statements


Perform your multiplication as part of your adjustment to getal, not as a separate part of your if statements:
 a = ((getal - 1) / 5) * 4
 if a % 5 == 1:


Consider negating your tests. Instead of looking for &quot;good&quot; values, look for &quot;bad&quot; values. Because you are testing for &quot;failure,&quot; and because the response to failure is to jump away (continue), you can replace nesting with a series of tests at the same level:
 if a % 5 != 1:
     continue
 b = ...
 if b % 5 != 1:
     continue
 c = ...
 if c % 5 != 1:
     continue