Super Mario Bros is the beginning, followed by bros 2 since peach is safe.
Bros 3 begins with Peach being safe and introduces the koopalings who go on to appear in the sequel which introduces yoshi.
Yoshi makes a cameo in 64 and directly acknowledges SMW and Bowser makes a few comments at how this isn't the first time he's been defeated.
Luigi's Mansion has the bros meet E.Gadd who gets referenced in sunshine. (which also has various references to specific games) said game also introduces Bowser jr who becomes a series regular and in Galaxy we see Peach's castle which looks exactly like how it did in 64 (with some minor additions and more toad houses)
Said game also introduces Rosalina and Captain Toad who appear in 3D world and Captain Toad Treasure tracker ends with the opening of 3D world.
Obviously one can point out plenty of contradictions as well so the way I like to see it is that the series has extremely loose continuity.