What's the difference here?

I used to have the variable InitialYaw as the start of the Lerp function and the door wouldn’t open. Then I changed it to CurrentYaw as the lecture suggests and it worked as intended. But as I recall, CurrentYaw is set equal to InitialYaw. Why does it work with CurrentYaw and not with InitialYaw if they have the same value?

Because CurrentYaw is only set equals to InitialYaw at the beginning of the game. BeginPlay(), where CurrentYaw=InitialYaw() only executes once, at the beginning. Then, thi TickComponent() executes every frame, and there you have CurrentYaw()=FMath::Lerp… So CurrentYaw changes every frame.