You are seeing the if method in the wrong angle.
For a moment, forget about your Update funcion, lets assume a generic function.
If is only a comparison function, in other words, it will just evaluate if the condition between parenthesis is true, and if so, will execute the code between brackets. If is not a loop function.
While, in the other hand, is a loop function. It will execute while the condition between the parenthesis is true, and will only exit its loop when the condition becomes false.
The impression you have that IF is actually doing a per-frame loop is solely because Update is being called every frame, and thus, it will evaluate your condition in the IF once per frame. If is not being responsible for the loop, but your update function is.
With the while, every frame Update is called, and within Update, it'll loop internally until your condition in the WHILE is false, and in your example, this happens when boostcharge <= 0. So, every frame, you start boostcharge with, lets say, 10, and it'll exit with 0. In other words, you have a loop (the WHILE command) within another "loop" (the Update function).
The if method works because your boostcharge variable probably is class-scoped, so it'll persist the value of the variable between Update calls.
The FOR command will work exactly as WHILE, giving that your condition is met in the for loop as well.
Hope you now understand the difference between your IF and your WHILE inside the Update method.