He may simply be tired. The constant traveling, training, and battling can be exhausting both physically and mentally. Ash has been on this journey for a long time, and he could be at a point where he wants a more stable and less strenuous life. So, he stops being a Pokémon trainer and looks for a more relaxing and settled existence.
One reason could be that Ash has achieved all his major goals as a Pokémon trainer. He might have won all the important championships and feels there's nothing more to prove in that area. Another reason could be that he has had some kind of traumatic experience related to Pokémon training, like losing a very dear Pokémon in a battle that makes him not want to continue. Maybe he has also found a new passion, such as Pokémon research. He could have met some inspiring Pokémon researchers and decided to shift his focus from training Pokémon to studying them.