is there a way to collect traffic data (ip packages) and to save them in a way, that I can open them in an application like wire shark or something? … and how can I get this file onto my computer via the console? is that possible or do I have to use e.g. an usb drive or something?
You can use tcpdump to capture traffic, yes.
There’s no easy way to get a capture file off your host to your laptop via the console - you really want to do a scp via the network.
Your Vyos box is under the hood built on Linux, so many of the same tools (scp/tcpdump etc) are available to you.
A fancy new way for this would be ERSPAN as interface tunnel encapsulation type.
There is yet no proper documentation for it, just select the erspan encapsulation type. Another monitoring way would be flow-accounting under the system node.
Could you share how to setup this up for an existing interface?
Capture packets remotely with Wireshark and tcpdump over ssh - Back2Basics
It has examples to capture to local file on VyOS, then use winscp to download trace.
Also, it shows live wireshark trace using tcpdump (make sure tcpdump filter excludes your ssh session, or trace will explode!)