Which Linux AMI supports GUI in EC2 Service?

Ubuntu, Redhat, Fedora

What does the following command mean and actually do?
-> sudo dnf install httpd -y

You are telling the system, As a superuser, use the package manager dnf to install both Apache (httpd) and Git, and don’t ask me for confirmation

What is the advantage of using Apache Webserver over IIS?

Apache Webserver is free and open source. Importantly it can work on both linux and windows

What does these commands do? -> ls ->cd

ls: List Directory Content
cd: Show the files and folders in the Current Directory

Does Linux Instance also support all the previous things discussed? (namely EBS Volumes, snapshots, pricing etc.)

Yes