I have 2002 Toyota Rav4. I just replaced valve cover gasket and spark plugs. After doing that now my car stalls sometimes when I accelerate from stop.

If any bolts were stripped when tightening the bolts that may be causing this issue. Gapping the spark plugs can also cause misfiring issues and even a tiny air leak can cause major idle issues. You can attempt an aerosol spray test and see if there are any leaks around the areas where the valve cover gasket was replaced.