For practicing Cisco switch configuration in a virtual environment, you have several excellent options:
Cisco Packet Tracer is probably your best starting point. It's free for anyone with a Cisco Networking Academy account and specifically designed for learning. You can drag and drop switches, routers, and end devices to build complex campus networks, then configure VLANs, trunking, STP, and other switching protocols. It includes realistic Cisco IOS commands and provides immediate feedback on your configurations.
GNS3 offers more advanced simulation capabilities. While it traditionally focused on routing, newer versions support switching through integration with virtual machines or Docker containers running actual network operating systems. You can import Cisco IOS images (if you have legal access) or use open alternatives like Open vSwitch.
EVE-NG (Emulated Virtual Environment) is another powerful platform that can run actual Cisco IOS images in virtual machines. It provides a web-based interface for building network topologies and supports both switching and routing scenarios.
Cisco VIRL/CML (now called Cisco Modeling Labs) is Cisco's official network simulation platform. It's subscription-based but provides the most authentic experience since it runs actual Cisco software.
For a campus network scenario, I'd recommend starting with Packet Tracer since it includes pre-built scenarios and tutorials. You can create multi-building networks with distribution and access layer switches, practice inter-VLAN routing, configure trunk links between buildings, and implement features like RSTP, VTP, and port security.
The key is building progressively complex topologies - start with a simple two-switch VLAN setup, then expand to multi-switch, multi-building scenarios that mirror real campus environments.