Two ways to route between VLANs.

SVI on a Layer 3 switch

ip routing
interface vlan 10
 ip address 10.10.10.1 255.255.255.0

One SVI per routed VLAN; routing happens in hardware. Note: a L2 switch SVI is management-only (SSH, SNMP) plus ip default-gateway for the switch itself — it never routes user traffic.

Router-on-a-stick

interface g0/0.10
 encapsulation dot1Q 10
 ip address 192.168.10.1 255.255.255.0

Trunk toward the router, one subinterface per VLAN. Cheap and understandable, but one link carries all inter-VLAN traffic — single point of failure and a bottleneck; production usually graduates to SVIs.