TOKYO — Of all the laps she swam and medals she won and words she spoke at the Tokyo Olympics, here’s the most impressive aspect of Katie Ledecky, one of the most accomplished athletes on the planet: Eighteen years into a competitive swimming career, nine years after bursting through for an Olympic gold as a 15-year-old, five years past a run-up to an Olympics in which she was expected to win and win only, and hours after climbing out of the pool here for the final time, she was able to say this — and mean it: “I still love this sport.”

That, after a week in which she swam 6,200 meters in a pool of pressure, in which she won four medals but also lost at the Olympics for the first time, in which she sobbed on the lane line and stood on the medal stand, swelling as “The Star-Spangled Banner” played in a mostly empty arena.

“I’m really happy,” Ledecky said. “I guess that’s just the best way to put it.”

Sports are supposed to be, above all else, fun. It’s why you jump in the pool or tumble on a mat or pick up a glove or sprint across the yard when you’re 6. It’s why you flip on the TV to watch Ledecky and Ariarne Titmus, locked in focus in adjacent lanes at the pool, gold on the line. It’s why, in the Olympics, skeet shooting or fencing or judo or archery suddenly can become enthralling. There are stakes. There is competition. There is fun.

Yet the Tokyo Olympics have taught us, above all else, it’s easy to lose the fun along the way. An athlete’s smile here is an image in an instant — and only that. It belies nothing of the toll it took to get here, toiling in anonymity.

Look no further, of course, than gymnast Simone Biles. She arrived here as an icon. Through her openness after withdrawing from the gymnastics team and all-around competitions, she has helped embolden athletes to embrace self-care above the expectations of others. That message changed the gymnastics competition, in which Biles went from overwhelming favorite to onlooker. But it will resonate beyond Tokyo, beyond 2021, and that’s important.

The only American athlete who approached Biles in pre-Olympic hype is Ledecky. For the first time this century, these Games had no Michael Phelps. NBC and the U.S. Olympic and Paralympic Committee need characters around which to promote their coverage and their team. Biles and Ledecky are accomplished. They are appealing. So here came the cameras.

It’s a lot. It’s too much. And yet here’s Ledecky, on her sport, swimming:

“I love it more every year, I feel like,” she said. “I’m going to give every ounce I have to the sport. I love the training. I love the day-to-day. I’m just going to keep doing it until I feel like it’s time.”

She won gold in two of the sport’s most grueling races here, the 800- and 1,500-meter freestyles. She took silver in the 400 free, the first individual Olympic final she ever swam and didn’t win, but has the memory of an epic battle with the Australian Titmus and the knowledge that, in “losing,” she posted the second fastest swim of her life — bettered only by her world record. She took another silver in the 4x200 free relay with an anchor leg that, too, was the second best of her 24 years, one in which she dusted the Aussies and nearly chased down the team from China. And she swam a final and missed a medal, fifth in the 200 free.

Given that she has seven career Olympic golds, more than any female swimmer, maybe it’s easy to express love for the sport. Given that success, maybe it’s obvious that swimming through the 2024 Paris Games is a no-brainer, that 2028 on home soil in Los Angeles — when she would be 31 — is intriguing. If the medals are the reason to do any of this, then it’s no wonder Ledecky’s here, in the midst of a pandemic Olympics with no fans in the stands, smiling at the end of it.

But it’s clear the medals provide only surface-level accomplishments. For an athlete not to be swallowed by the repetition and discipline it takes to reach the Olympics, she must figure out ways to evolve, lest she suffocate herself. For Ledecky, some of that has happened naturally. For 2012 in London, she was something of a surprise to make the team, and the gold in the 800 — at 15 — was a stunner. Leading up to 2016, she experienced her first legitimate Olympic quad and everything that went into it, then went off to Stanford, a post-Olympic experience that involved getting sheets for her bed and decorating her dorm room.

“I think just having those different experiences has kept things fresh, has kept things fun and has kept me loving the sport,” Ledecky said.

It can’t be emphasized enough: Those aren’t givens. The national television audience sees only the finals, just half of her 6,200 meters here. No one saw the anonymous laps she swam at Stanford or the stress of finding a backyard pool at the beginning of the pandemic or the adjustments to adding another year of training when the Games were pushed back. Finding joy in all of that shouldn’t be taken for granted. It should be seen as a gift.

“As I’ve said many times, I think I love the training almost as much if not more than the racing, which I don’t know if everyone says,” Ledecky said. “ … It’s pretty natural for me.”

What’s not natural is what’s next: a break. Since London, she figures her longest time out of the pool was perhaps 2½ weeks following the Rio de Janeiro Games five years ago, a period when she was frantically headed to Stanford, moving away from her Bethesda home for the first time.

Now here’s what’s on her agenda: nothing. What a novel concept. She began in the front row Sunday morning at Tokyo Aquatics Center, boisterously banging a pair of red thundersticks and leading cheers to boost her teammates. She hasn’t been back home since before the pandemic, so there’s the natural checklist of things she would like to do: sleep in her own bed, play water basketball and ping-pong at the Palisades pool and maybe visit her two alma maters — Little Flower School and Stone Ridge — with fellow Olympian and alum Phoebe Bacon.

“Going to a Nats game would be fun,” she said, but added quickly — speaking for an entire region — “I was sad when I saw the [Max] Scherzer news yesterday.”

That all sounds normal. That all sounds fun.

Still, the pool will pull.

“It’s hard to keep me out of the water,” Ledecky said. “I sleep better when I swim. I feel better when I swim. It’s just a huge part of my life. I get very anxious — I get very eager to get back to training.”

What Katie Ledecky accomplished in Tokyo extends her Olympic legacy, and that’s wonderful. Yet her greatest achievement isn’t winning more medals. It’s finding the fun in it all.