There is a classic "rule of 5s" that says that you want your "system" to be 5x the capability of the highest waveform you might want to measure. This would mean you are looking for a 200MHz oscilloscope.
Others.. I'm not sure if this "rule of 5s" is still considered valid, so if I'm wrong here, please correct me.
A 40Mb/s signal "is" a 20MHz square wave, and the rule of thumb would imply a 100MHz scope.
More accurately, the period is irrelevant and
only the risetime is relevant. BW = 0.35/risetime.
My bias is that, since nothing is truly digital until you are dealing with individual electrons/photons, you need to use a scope to check the signal integrity. I.E. clean transitions, correct levels. Once you have good signal integrity and and therefore know the digital signals are reliable, you are working in the digital domain and should use digital tools. Yes, there are exceptions, but those aren't relevant here.
IIRC the fastest scope is
160GHz160GS/s, which would easily see a 5GHz signal. But if you could afford it you wouldn't be reading this forum.
If you are looking at "GHz noises", then you are probably more interested in a power meter and/or a spectrum analyser. Understanding what you want to measure
and why is the key to picking the right tool for the job.