Younger Americans get a bad reputation when it comes to managing their finances, but it turns out they're stashing money away for retirement earlier than previous generations, according to a new Bank of America survey.

Millennials – Americans between the ages of 24 and 41 – started saving for retirement at 24 on average, well before Generation Xers at 30 and baby boomers at 33, according to the bank's 2020 Better Money Habits Millennial Report released Thursday, which surveyed 1,903 respondents.

Significantly more millennials are socking money away despite facing debt woes.Nearly 3 in 4 of them are saving, up 10 percentage points in two years. Roughly a quarter of millennials have $100,000 or more set aside, up from 16% in 2018.

They’re also practicing positive money habits. Over the past year, nearly 40% of millennials boosted their credit score, 29% secured a raise and 24% saved more money for retirement.

"Older millennials that have had their jobs for awhile and have been contributing to their 401(k)s have likely seen their net worth rise in the midst of a strong stock market over the past decade," says Andrew Plepler, global head of environmental, social and governance at Bank of America. "But those who are newer to the workforce probably haven't been able to see the benefits of an appreciating 401(k) or rising housing values just yet."

Taxes 2020:How long will it take to get my tax refund this year?

Coronavirus:Some US businesses restrict travel to China

Of millennials with savings, three-quarters are saving for retirement, more than half are building an emergency fund and one-third are saving to buy a home, according to the survey. Homeownership is an even bigger goal for younger generations. Of those with savings, 41% of Gen Z and 40% of younger millennials are saving to buy a home.

To be sure, more than half of all millennials say they feel behind financially compared to where they thought they’d be despite financial success.

One reason why: Debt remains an obstacle for many.

More than three-quarters of millennials carry debt. Excluding home loans, one-in-six of millennials owe $50,000 or more. The types of debt millennials are dealing with include: auto loans (40%), credit card debt (37%), mortgages (36%), student loans (25%), personal loans (12%) and medical debt (11%).

Financial security still feels far away for some. Seventy-five percent of millennials aren’t confident about their current financial situation, and 73% aren’t optimistic about their financial future.

The top financial "stressors" of millennials, according to the survey, include:

Not saving enough (44%)

Planning and saving for retirement (38%)

Not making a high-enough salary (32%)

Living beyond their means (26%)

Credit card debt (25%)

Saving for a child’s education ( 20%)

Not being able to afford a home (20%)

To combat this, many millennials have made trade-offs to make it all work, including lifestyle changes and personal sacrifices. Single millennials, for instance, are more likely to choose to fund a down payment on a home (82%) over their dream wedding (12%). And roughly 70% of all millennials said they were willing to cut back on dining out.

Many worry their peers are doing better than them, but experts say millennials' financial habits and prospects continue to improve.

“The establishment of good money habits early does pay off over time,” Plepler says. “The more you can establish a strong financial hygiene earlier in your career, the more stability you’re going to have throughout the highs and lows of an economy.”