Yes, he won by a landslide and the biggest factor was the bad economy.
Anyone who thinks 49.9% of the vote (vs 48.4%) is a landslide will quickly find them in negative approval ratings if they think that gives them much political capital (if trump focuses and spending rather than earning capital, that is, which he definitely will).
Recall that GWB declared a mandate (to reverse all progressive social programs since the New Deal) when he squeaked out a victory over Kerry.
2024 election: Trump 49.7% 77.3 million (312 electoral), Harris 48.4% 75 million (226 electoral). Republicans control of House (but lost 1 seat) and control of Senate (gained 4 seats).
1972 election: Nixon 60.7% 47.2 million (520 electoral), McGovern 37.5% 29.2 million (17 electoral). Democrats control of House (but lost 13 seats) and control of Senate (gained 2 seats).
1984 election: Reagan 58.8% 54.5 million (525 electoral), Mondale 40.6% 37.6 million (13 electoral). Democrats control of House (but lost 16 seats). Republicans control of Senate (but lost 2 seats).
Source: many Wikipedia links
You may think that expensive gasoline and cartons of eggs are a meme, but the reality is that the economy has become pretty damn Shite(tm) for the commons. Costs of living are objectively higher than they were just a couple years ago and incomes haven't kept pace either.
The stock market is having the time of its life (and as a small time investor I find that nice) but it's completely detached from the economy.