To apply changes done to "/etc/my.cnf", do we need to restart mysqld service?
Some server parameters are dynamic and can be changed on the fly. Some are not and should be configured in the my.cnf followed by service restart. max_connections can be changed on the fly by command SET GLOBAL max_connections=XXX. This value will be in effect until service restart.

To be clear, the possible options are:

Run SET GLOBAL max_connections = XXX for immediate use until service restarted
Add the max_connections = XXX line to the [mysqld] section of the my.cnf AND restart the service for permanent use
Run SET GLOBAL max_connections = XXX AND add the max_connections = XXX line to the my.cnf but DO NOT restart the service.

The third option allows to get both immediate changes as well as permanent but with zero downtime. Value in the my.cnf will wait for some event/incident/accident causing a service's restart.