A subnet is a connected group of hosts with IP addresses in a specific network range. For e.g. The hosts in addresses 10.23.2.1 to 10.23.2.254 all comprise the same subnet i.e. 10.23.2.
A subnet is a cluster of interconnected devices sharing IP addresses within a defined network range. Think of it as a neighborhood where computers, like those with addresses from 10.23.2.1 to 10.23.2.254, belong to the same subnet, distinguished by the common network prefix 10.23.2