Yes, I know they sound the same in conversation. They’re not supposed to look the same in writing.
Then refers to sequence or consequences. Examples include:
Don’t worry about that mess; we’ll finish eating dinner, then we’ll clean it up. (Sequence.)
Sure you can build a house right here in the mudslide zone, but then you won’t be able to get insurance for it. (Consequence.)
Than is used in comparisons. Example:
California is bigger than Texas in population, though Texas is bigger in land area.
Any phrase using bigger, smaller, less, more, worse, better, older, newer, or any other adjective of comparison will use than, not then. Another way to say “instead of” is “rather than.”
This is one of those spelling issues that will not appear in a spell-check. Both words are technically spelled correctly, but they are not used interchangeably.