Sean Connery exited the James Bond franchise to make his one and only Western. The success of Dr. No would kick off one of cinema's most iconic franchises, and there had never been a movie phenomenon quite on the same scale before. However, Connery began to tired of both the role and the producers behind the series. He feared being permanently typecast and that he wasn't being fairly compensated, given the overwhelming success of the franchise. He first departed 007 following 1967's You Only Live Twice, his fifth outing as Bond.
https://screenrant.com/shalako-movie-sean-connery-only-western-james-bond-movies-quit/