Iptables command issues

board Colibri iMUX6ULL with Linux 5.4.

when I ran this command in Linux:
iptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
I got the following error message:
iptables v1.8.3 (legacy): Couldn't find match state
After search the internet, I was suggested to run the following command:
iptables -A OUTPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
But I got the following error:
iptables v1.8.3 (legacy): Couldn't find match conntrack’`

The initial command was working properly in the earlier Linux version (4.4).

Would you please let me know what might get wrong. Thank you very much.

never mind… found out the reason. It was by default, the kernel was not compiled with the NETFILTER MATCH STATE option