As per comments, there's no real difference between the two idioms.
In other contexts (such as programming) an instance of something means an incarnation, actualisation, realisation (a real thing, as opposed to a definition of that thing). And an example can often mean an instructional case (perhaps specifically created for educational purposes).
But both for instance and for example are used in exactly the same way to introduce a specific illustrative case (or cases) - often with the implication it's just a random selection from many possible alternatives.
OP has already established that for example is more common (as my link shows, it's been increasingly displacing for instance over many decades). Initially, I was prepared to believe this might justify saying that for instance is "more formal".
But in fact I don't sense that myself, and I find no evidence for the idea. Consider these usage figures...
1a: for example I have (1,100,000 written instances in Google Books)
1b: for example I've 104,000
2a for instance I have 704,000
2b: for instance I've 76,500
In both cases the "informal" contracted versions account for about 1 in 10 usages, which strongly suggests no significant difference in terms of formal/informal register.
So my advice to OP is to accept for instance as an exact synonym whenever he comes across it, but to stick with majority/modern usage and always use for example in his own speech and writing.