The problem with mob movies that don't idealise the mob (such as the Godfather) is that mobsters are mostly quite boring people. They're crafty but stupid. You have to be a bit dim, as a general rule, to be so good at intimidating and killing people. That's also the issue with Wolf of Wall Street, I suppose. He's showing the emptiness of these people's lives but that makes those movies a bit empty, too.
The Sopranos got around this by making Tony Soprano a bit implausibly deep and conflicted, and going to a therapist. The more goonish mafiosi in that are side characters, walk-on parts.
And of course they're very seductive, too. They make crime seem cool in spite of themselves. Although what I like about Goodfellas is the slow but sure unpeeling of that glamour. Everyone dies. (Ditto The Irishman.)
I watched that 'Legend' the other night, about the Krays. It's a good exercise to watch that b2b with Goodfellas because Legend is a sort of wannabe Scorcese flick that is piddling away in the Championship division mid-table while Goodfellas is eyeing the European cup. (The Godfather 1/2 are probably lifting it though.)