You can calculate the probability of having a fair coin and as N(Heads) increases that probability goes down. Each flip is indeed independent but the distribution of flips tells you something about the coin.
We aren't predicting flips based on "a" previous flip. We're predicting them based on the set of ALL KNOWN previous flips, which allows a statistical model.
The odds of that happening by chance is so astronomical it involves a number you've probably never even heard of.