It’s completely up to you. If the game of basketball no longer brings you joy, then maybe start considering a new hobby. I'm big on doing what makes you happy. People change, so don't push through unhappiness regardless of how much talent you may have.
But before you stop, find the root of what is making you unhappy. If there's a deeper problem at hand aside from basketball, seek help. Positive mental health is important. Guys like Kevin Love, DeMar DeRozan, and Larry Nance back in middle school have spoken on the mental health challenges they faced. Consider all of your options.