The banking sector got a wake-up call in early 2023 from a few high-profile meltdowns. Although the run on several regional banks didn't spread far, it reminded investors that banking can be risky if companies don't handle themselves in a conservative manner. That's why investors will likely be attracted to industry giants Toronto-Dominion Bank (TD 0.46%) and Bank of America (BAC -0.21%), and why they might want to steer clear of Wells Fargo (WFC -0.03%). Here's what you need to know.

A minor setback for Toronto-Dominion Bank

In 2023, Canada-based TD Bank was scheduled to buy a regional U.S. bank. That plan fell through because U.S. regulators were displeased with the company's approach to monitoring money laundering. The bank is likely to see a fine come from this turn of events, even as it works to update its business to better comply with regulations. That fine will be more of a slap on the wrist than a material business setback. But while the issue lingers, investors are downbeat about the company's growth prospects, given bank acquisitions are probably a no-go for a bit.

Now add in worries about the housing market in Canada, which had been very hot for a long time. But inflation picked up and interest rates rose in response. Higher rates are likely to drive up the number of struggling customers the bank has to deal with. TD Bank has been through more than a few tough markets in its 100-year-plus history, however, so it should muddle through OK. Still, that's the backstory behind TD Bank's 5% dividend yield, which is near the highest levels of the past decade. That's an opportunity if you can handle investing against the crowd while you wait for the headwinds to pass. It is highly likely they will.

Bank of America is a U.S.-focused option

Bank of America's dividend yield is around 2.9% today. While notably lower than TD Bank's yield on an absolute basis, it is near the loftiest levels of the past decade. That suggests that investors might want to take a look at Bank of America while it looks historically cheap.

That said, TD Bank didn't cut its dividend during the Great Recession, and Bank of America did. But Bank of America isn't the same company today as it was then. In fact, it has been performing extremely well in the face of rising interest rates. For example, the company grew earnings by 7% in 2023 despite the industry's problems and the impact of rising interest rates on customers, reducing demand for loans and increasing the number of customers struggling to pay their existing loans. While TD Bank may be a more attractive dividend stock in many ways, some investors will probably prefer Bank of America's stronger U.S. focus and the lack of bothersome regulatory issues.

Wells Fargo is still an ugly duckling

Speaking of regulatory issues, investors looking at bank stocks might want to tread carefully around -- if not totally avoid -- Wells Fargo. The company's once-sterling reputation was famously tarnished by a fake account scandal. The problems ran deep, with the bank incentivizing employees to open new accounts without customer consent and then not really monitoring what was going on. That left customers with accounts they didn't need, and sometimes, accounts they didn't even know they had. When it all came to light, Wells Fargo fell under intense regulatory scrutiny.

The extra scrutiny isn't over yet, and it is likely to limit the company's ability to take advantage of growth opportunities. And, on top of that, the yield is 2.8%, a touch lower than Bank of America's yield. Why would you want to buy a lower-yielding bank stock that is likely exposing you to more regulatory risk? If you are considering Wells Fargo, you're probably better off with Bank of America. And even if you are willing to take on regulatory risk, TD Bank has a much more attractive yield.

You have options if you are looking at banks

Both TD Bank and Bank of America have historically high yields right now and the headwinds that have dragged the shares down are likely to pass in time. Comparatively, Wells Fargo's tarnished brand should probably be avoided, especially since you can generate more income from owning the stocks of Bank of America and/or TD Bank.