When using VLANs in RouterOS, you have to start using vlan interfaces, these allow ROS to work with individual VLANs. Have a look at this manual page. And look for other manual documents, explaining VLANs, e.g. this nice tutorial. You may want to study some resources dealing with VLANs in general if the concept is not entirely clear to you.
After you properly use vlan interfaces to set up L3 (IP) configuration on router, the rest of functions (routing, NAT, firewalling) are set up in manner, similar to using “plain” interfaces.