LeBron James and Kobe Bryant fought for the title of the best player in the world throughout the late 2000s and the early 2010s, with both players winning MVPs, championships, and Finals MVPs during that time. Michael Jordan's legacy as the GOAT loomed large in the 2000s after his retirement and Bron and Kobe were as close to reaching it as any other players have been since. Ty Lue went as far as to say that all three were 'the same'.
While fans of either player will argue that one was better than the other, it's hard to objectively tell. For much of the mid-2000s, both were on rosters that didn't allow them to go very far in the playoffs, but that changed when the Lakers finally managed to put a good team around Bryant and the LeBron eventually moved to the Miami Heat.
Both players won two championships after that, so again, it's hard to differentiate. An excellent way to look at it though is to compare their NBA 2K ratings since the game started being produced, something Shahin Ourian on Instagram did.
When 2K came about at the turn of the millennium, Kobe had just embarked on his threepeat with Shaq, and as such, his ratings throughout that time and after were incredibly high. Even after LeBron came into the league, Kobe had the better rating in the first 6 out of 7 times they could be compared, and they were both rated at 99 the one season Kobe didn't outright have it better.
After 2012 though, as LeBron fully got into his prime and Bryant started to decline a bit with age, LeBron enjoyed 5 straight seasons when he was rated higher than Kobe and was widely considered the best player in the world. While 2K ratings might not be the be-all and end-all of any debate of this nature, it does provide an excellent insight into how close these two legends were when operating at their best.