The economy is in BETTER shape, inflation has slowed, but people are comparing how much things cost today compared to their wages, and they latter have not kept pace. Most people are not macro-thinkers. They look at how much they're paying vs. how far their paychecks go, and the Democrats were in power as this erosion took place. It it the D's fault? No. There were many reasons for the inflation, Trump among them, and I think Biden did everything he could to get inflation under control. Yet many, if not most, people ARE worse off today. Talking about the economy is not going to move a lot of needles, because people can see clearly that this is not the case "for them". This was always the problem that we were going to face.
This is Carter in 1980. Nixon took us off the gold standard in 1972, which immediately jumpstarted inflation as everyone rushed into buying oil getting out of the dollar, which the oil producing states then capitalized on, causing a long inflationary spiral that persisted throughout the 1970s. Carter caught the brunt of it (he beat Ford in 1976) and while everyone remembers the Iran Hostage Crisis, what often gets forgotten was how devastating inflation was at the time. Volcker was eventually able to tame it in 1983 under Reagan by raising interest rates. It worked but it also impacted the wealthy, and Volcker was out on his ear shortly thereafter.
This is NOT the only reason that Trump won, but it was a contributing factor that the Democrats really couldn't have done much about. Biden had no alternative - he had to combat the inflation, but most of the inflation, once you factored out supply chain disruptions, had to do with corporate greed. One of the most successful things that the Republicans ever did was to tie 401K plans to the stock market. This makes corporations the good guys, even when in many cases they are corrupt and sleazy, and the corporate media works hard to burnish that image.
It doesn't excuse the way that people voted, but it probably does help to explain why it happened.