the first step is to locate your project folder
then run these commands one by one
npm uninstall react react-dom
npm install react@18 react-dom@18
npm install --no-audit --save @testing-library/jest-dom@^5.14.1 @testing-library/react@^13.0.0 @testing-library/user-event@^13.2.1 web-vitals@^2.1.0
here what we are doing is uninstalling react19 and installing react18.
or you can go with this youtube link: https://youtu.be/mUlfo5ptm1o?si=hYHTwc7hApEXzPX5