There's no magic to this.
There really aren't that many types of 2-port devices. Some things that come to mind:
- Attenuator (fixed or adjustable)
- Phase shifter / delay line (fixed or adjustable)
- Filter (many different shapes)
- Discrete passives (R,C,L, or a crystal as mentioned by glen_geek)
- Antenna (A 2 port antenna could be dual polarization or just a dual antenna for MIMO.
But this is pushing the definition of a 2-port black box)
Some of these will make their bandwidths obvious. For example, if the device has gain, it's an amplifier, and then it's quite easy to pick out a 1dB or 3dB bandwidth based on the peak gain. If the device has a clear frequency corner, it's probably a filter, and again, easy to see the operating bandwidth (although you have to decide which bandwidth definition to use). An isolator is also obvious because it's the only device without gain that is non-reciprocal (S21 != S12). Once again, an isolator's bandwidth can be easily defined as (e.g.) 1dB extra loss beyond the minimum insertion loss.
The rest of the devices I mentioned are somewhat more ambiguous because they don't tend to have obvious shapes or clean frequency corners, and here it may be difficult to define an operating frequency without knowing the intent of the device. For example, a capacitor might desire minimum insertion loss because it's going to be used as a DC block, while an inductor might desire maximum insertion loss because it's going to be used as an RF choke.