
IF is a conditional clause in English. This means that one action will/may happen as a result (on the condition) of another action or other actions.
English Grammar
The clause IF can come after the main action:
“I will go to Hawaii if I can find a cheap hotel.”
Or it can start a sentence and end with the main action:
“If I can find a cheap hotel, I will go to Hawaii.”

I will go to Hawaii if I can find a cheap hotel. – The main action is ‘go to Hawaii,’ but this action can only happen as a result of ‘finding a cheap hotel.’ (On the condition of finding a cheap hotel)
More examples
“I would eat this ice cream if I wasn’t on a diet!”
“If I eat this ice cream, I’ll regret it tomorrow.”
IF at Oxford Learner’s Dictionary
https://www.oxfordlearnersdictionaries.com/definition/english/if_1?q=if
Learn the If Conditional – Easy English Grammar
Check out my complete IF post at
https://worldenglishblog.com/learn-the-if-conditional/

Pingback: English grammar Unless - As long as (Learn with lots of natural example sentences!) - World English Blog