TAM is the upper bound of the market opportunity, calculated as if the company had no competition and no friction. It's the headline market-size number on most pitch decks and the most commonly inflated.
A defensible TAM is built bottoms-up: count the eligible customers, multiply by realistic ACV, and show the math. Top-down TAM (analyst report says the market is $X) is widely distrusted because it rarely maps to the company's actual ICP.