Please help me to separate vpn and wan traffic via two different ethernet ports

I used following solution to get internet working on my second vlan. ip route add default via 10.10.1.1 table 10 ip rule add from 192.168.1.187 table 10
https://forum.openwrt.org/t/solved-2-vlans-and-no-internet-on-1-vlan/8591/9?u=bulat

Could you please explain to my how to add it to startup section?

Also when I tried to enter whole subnet ip rule add from 192.168.1.0/24 table 10, my console hang and Luci didn’t respond.

Should I use solution mention above or use policy based solution?