What is the difference between below commands?

Hi Guys,

In my Centos Server I want to open the port number of (2555) in the iptables, I executed the following command

iptables -A INPUT -p tcp --dport 5901 -j ACCEPT

Port is not working from am trying to access the server, then I defined the same rule in the same server as mentioned, its working fine

iptables -I INPUT -p tcp -m tcp --dport 5901 -j ACCEPT

I need what was wrong with first command and what is the difference of both ?

Please refer any iptables links to learn thanks.

First one- Append one or more rules to the end of the selected chain. When the source and/or destination names resolve to more than one address, a rule will be added for each possible address combination.

Second one is - Insert one or more rules in the selected chain as the given rule
number. So, if the rule number is 1, the rule or rules are inserted at
the head of the chain. This is also the default if no rule number is
specified