First you need to change the sdm prefer from dafult to lanbase-routing.
The lanbase-routing template supports IPv4 unicast routes for configuring static routing SVIs.
Static routing is supported only on switched virtual interfaces (SVIs) and not on physical interfaces. The switch does not support routing protocols.
conf t
sdm prefer lanbase-routing
end
wr
reload
Then you have to enable ip routing:
conf tThen you can add the static routes you like.
ip routing