Way too many factors to come up with any sort of ‘best’ for everyone.
Just taking a simple XC/trail bike as an example (could be hardtail or a FS bike)
Steel – toughest at resisting knocks, great for me as I like to throw it in the back of the car and not really care about it getting dented, and it’s Usually pretty strong/stiff too. Downside is it’s always a bit heavier.
Aluminium – good and cheap, probably the best value for money, does everything well without being great at any one particular thing.
Carbon Fibre – strong, light, rarely cheap though, although it is getting cheaper, brands like On-One selling frames <£500 (or even <£300), but then they’re also selling steel and alu frames <£100.
Titanium – As strong as steel, as light as aluminium, but probably now only of niche value since carbon fiber now makes stronger and lighter frames.