Basically English (along with other Germanic languages and a whole bunch of others) doesn’t like having a verb by itself without something to do the verb, so we just put “it” in as a sort of placeholder. The “it” isn’t anything, but the grammar wants there to be something there
This is probably a lot heavier on the technical grammar than you need, but here is the relevant wikipedia page if you want it https://en.wikipedia.org/wiki/Dummy_pronoun
Basically English (along with other Germanic languages and a whole bunch of others) doesn’t like having a verb by itself without something to do the verb, so we just put “it” in as a sort of placeholder. The “it” isn’t anything, but the grammar wants there to be something there