They are synonyms.
"Whole" is the usual, everyday, spoken word.
"Entire" is more formal or literary. It might also be used for emphasis that you mean 100.0000%. "Entire" also has some specialized uses. In botany, for example, the edge of a leaf is either "serrated" (like a tiny sawtooth) or "entire" (smooth-edged).
It is the usual thing. I checked a dictionary and found what I expected. "whole" is derived from Middle English (and Anglo-Saxon), "entire" from Old French (and thus Latin). Because of the history of England, and its conquest by the French-speaking Normans in 1066, English has almost a double core vocabulary. There are many such pairs of near-synonyms, in which the Anglo-Saxon word is less formal and the French or Latin-derived word is more formal.