2007 Toyota RAV4 stalled

About two weeks ago, my 2007 Toyota RAV4 Sport alternator broke. I ordered a new alternator from the AMAZON. It was a correct part for the SUV in accordance with AMAZON. A mechanic replaced it with a new alternator.

I am not sure if it is related with the replacement of the alternator. My SUV stalled and then stopped completely twice when I slowed down as I was approaching a stop sign. I was driving on 3D gear. I purchased this car about 2 years and 4 months ago. I never had this problem before. I would appreciate if you can give me an insight on this. Thank you.

Sang Park