Photo: Cleveland Cavaliers/YouTube

James Harden returned from a broken thumb to score 22 points, helping the Cleveland Cavaliers edge the Brooklyn Nets 106-102 at Barclays Center on Sunday.

Reflecting on his career and future, Harden said, via Michael Scotto, “I know it’s coming soon. Hopefully, later than soon, but it’s a reality. Everybody has to go through this at some point. Just trying to continue to keep my body in shape and play well. We’ll see what happens in the next few years. Take one game at a time and cherish the moments.”

The 17-year veteran shot 5 of 9 from the field, 4 of 7 from three-point range, and 8 of 12 from the free-throw line, adding nine rebounds and eight assists in his comeback. Harden missed two games after fracturing his thumb in Tuesday’s win over the New York Knicks.

Cleveland rallied from a 56-42 halftime deficit, fueled by Jarrett Allen’s 20 points and Evan Mobley’s 16 points and 13 rebounds, to hold off Brooklyn’s late surge. Dennis Schroder and Mobley sealed the win with crucial free throws in the final seconds.

Harden’s return gave the Cavaliers a boost during a challenging stretch with Donovan Mitchell sidelined for a groin injury and Dean Wade out with a sprained ankle.

Brooklyn’s Michael Porter Jr. led the Nets with 26 points, while Danny Wolf added 23, but the team fell to 15-45 overall, losing its eighth straight game.

Looking ahead, the Cavaliers aim to continue momentum, hosting the Detroit Pistons on Tuesday, while Brooklyn travels to face the Miami Heat.