It says on the box.
But it’s a choice the device manufacturer makes, like using zwave or Zigbee. You as a customer can’t do anything about it.
If the device uses Matter over thread, You’ll need a “thread border router” somewhere in the home. But it doesn’t have to be your hub. See the FAQ for details:
FAQ: What do I need to add a Matter device to the SmartThings app? Do I need a bridge router device?
Typically mains powered devices will use matter over WiFi, and battery powered devices will use matter over thread, because thread has much lower power requirements. But again, that’s up to each manufacturer, and there are some devices of each protocol in each device class.
Also “matter bridges“ may use WiFi or LAN To communicate to your Account, but can use anything they want to, including proprietary protocols, to communicate to their own devices that are connected to that bridge. For example, the aqara M2 hub uses Zigbee To connect to its own motion sensor. The SwitchBot hub 2 uses Bluetooth for its child devices. Both are matter bridges, which use Wi-Fi to communicate with SmartThings or Apple Home.
And again, the transport protocol they use will be listed on the box.