It declined n 2022 due to a few main reasons...
the Fed, worried about inflation, raised interest rates 11 times in the early part of the year. Any economics student can tell you that when interest rates rise, the stock market goes down. (The Fed controls interest rates, not the President.)
Another was the war in Ukraine. Wars bring short term uncertainty.
Supply chain issues, first started during Covid and made worse due to the war, were continuing and causing economic problems.
By the end of 2024, the market had recovered and reached all time highs.
It's rare that a President can affect the stock market long term unless they make major changes to economic policy. Like across the board tariffs.
Since it's high in February, the stock market is down about 14%. A stock market is considered to crash, and start to cause real concerns, when it drops 20%. We'll see what happens in the next few days.