Iptables rules are not persistent. After reboot, they are flushed. So that you don't suddenly find yourself without a firewall, the rules can be automatically reloaded with a system service.
To do this, you create a Systemd Unit that automatically loads the iptables filter rules. This way your own firewall rules are permanently applied without you having to worry about them every time.
First you created some iptables rules with a text editor. The text file is then saved to /etc/my-iptables.rules.
# example *filter -P OUTPUT ACCEPT -P INPUT DROP -A INPUT -i lo -j ACCEPT -A OUTPUT -o lo -j ACCEPT -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT #...
(This is only an example, not a complete firewall - a guide for a firewall with iptables can be found in the Arch Wiki)
Next, create a simple Systemd Unit with a text editor that loads the iptables rules:
[Unit] Description = Apply my IPv4 Iptables Rules
ExecStart=/bin/sh -c "/sbin/iptables-restore < /etc/my-iptables.rules"