Opportunity knocks is the first words of a popular proverb / idiom about opportunity
Opportunity knocks but once.
Other proverbs are
Strike while the iron is hot.
Make hay while the sun shines.
All mean that it is best to act on an opportunity when you have a chance, otherwise you might never see it again..
Anonymous“Is it true that there is always difference between the two words when they can both work in the same case?”
No, in a pair of words like these, there is not always a difference, and in a situation where one person might use the first word, another person would choose the second.
English has a huge vocabulary of words because the English lexicon has inherited words from older languages - Latin, French, German, Greek, etc. Etymology is the study of word history. For example,
Chance comes from old French word: cheance "accident, the falling of dice,"
Opportunity comes from the Latin: opportunus "fitness, suitableness, favorable time" from the phrase ob portum veniens "coming toward a port," in reference to the wind, from ob "to, toward" + portus "harbor. (Opportune still retains the original meaning)
Over the years, the words chance and opportunity have become closer in meaning, almost synonyms, but they still retain their historic character.