This story is part of the Top of the Game series, where CNBC Make It delves into the habits, routines and mindsets that top athletes use to achieve peak performance and success.

Sometimes, it takes a while to figure out what you’re best at doing.

Nell Rojas, one of the top marathoners in the U.S., knows that feeling well: The 34-year-old didn’t start racing marathons until four years ago.

A successful steeplechase runner in college, Rojas spent most of her 20s working as a running coach in Boulder, Colorado, where she was born and raised. She competed in triathlons, and says she started running marathons at the suggestion of her father and coach, former top-ranked distance runner Rick Rojas. “Go out and jog,” she recalls him saying in 2018. “See if you like it.”

Rojas promptly ran 26.2 miles in 2 hours and 31 minutes, finishing 7th at the 2018 California International Marathon. The result made her “jaw drop,” she says.

“Of course, my dad being my biggest fan, he was like, you’re going to make the Olympic team,” Rojas tells CNBC Make It. “And I was like, OK, settle down.”

Last year, she finished as the top American at the Boston Marathon. She repeated the feat earlier this year while logging a personal best time of 2 hours, 25 minutes and 57 seconds — and now has her sights on the U.S. Olympic trials in 2024.

Here, Rojas discusses how an egoless mentality helps her constantly improve, why she thinks most people think about mental toughness the wrong way and how she organizes her brain around an “absence of negativity.”

How Rojas takes her ego ‘out of the way’ to constantly improve

I think the most important thing is being realistic. It’s like saying, “I never cook. I’m going to be a great cook.” How can you be a great cook if you never practice or don’t know anything about it?

I take my ego out of the way and go into things realistically, understanding that the end result honestly does not matter. We’re all human. If we fail, we fail. There will be more opportunities in the future.

This year, leading up to the Boston Marathon, my quads were pretty beat up. And my training plan basically went to s—. But I was like, “I’m going to show up on the line. I’m going to be logical about this. I’m going to do the best I can do and run my own race.”

You have to take away your ego. Make sure you’re doing what’s appropriate for you. And then go from there. Having that outlook keeps you going, and as long as you’re going, you’re getting better. 

Why she thinks most people approach mental toughness the wrong way

I think the mentality of “no pain, no gain” is completely wrong.

Working harder isn’t necessarily better. It’s all about training really smart. If you’re not having a good day, just reprogram the workout to something that’s productive.

With the amateur age-group athletes that I coach, the one big difference [from elite runners] is that if I have a bad workout because I’m running a lot, I understand: It’s because, yeah, I was really freaking tired today. I take it for what it is and move on.

Instead, age-group [runners] will put tons of emotion into it. They’ll want to either give up or work way too hard. A lot of people want to go from zero, skip all the steps, and have all the success in the next four months. My job is managing those expectations.

How she organizes her mindset around an ‘absence of negativity’

I think [the key to my mindset is] an absence of negativity. It’s not natural for me to be a super-positive person. But I’m really good at not being negative, which is more important. 

In a race or during training, negative thoughts are going to pop up. Something’s not going to go exactly as planned. Basically every race, I’m like, “I’m definitely going to drop out. There’s no way I’m finishing this race.”

But I’m not emotional about it. I know exactly why my body’s telling me this, and I’ve been through this before. So I’m just going to keep on running. As long as you recognize those thoughts, you can silence them.

[You learn] how to cope with something you’re scared of, or you don’t want to do: Do it anyway. Get through it and do it well. We run into those things like every day in daily life, right? We’re like, “I’m really scared to go do this.”

At least for me and all my athletes, we have to get through two workouts a week that scare us. I think that’s a huge skill.

This interview has been edited for length and clarity.

Sign up now: Get smarter about your money and career with our weekly newsletter

Don’t miss: Chiefs quarterback Patrick Mahomes: ‘Defeat helps you more than success’