Sorry for the newbie question, but I'm getting lost in using VLAN.
In the switch I would like to create 4 VLAN zones: LAN (10), DMZ (20), Home (30) and Guests (40).
On the firewall there are 3 NICs: one is connected to the router and one is connected to the first port of VLAN 10.
Now if I configure the third NIC with the other 3 VLANs, where do I connect the cable?
To a switch port that is configured to carry three VLANs tagged - in Cisco speech called a "trunk" port. You need a manageable switch for that.
But if I have a port tagged for Guest, Home and DMZ, doesn't it create a security problem?
A guest is in the same DMZ port.
No, because that port connects to OPNsense which will process the tags and treat all VLANs seperately. You connect your devices to other untagged ports assigned to only one VLAN.
You might want to read up about how VLANs work.