In the doc: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-update-security-groups.html It syas the following when editting the security group of load balancers:
Update the associated security groups
You can update the security groups associated with your load balancer at any time.
To update security groups using the console:
1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
2. On the navigation pane, under LOAD BALANCING, choose Load Balancers.
3. Select the load balancer.
4. On the Description tab, under Security, choose Edit security groups.
5. To associate a security group with your load balancer, select it. To remove a security group from your load balancer, clear it.
6. Choose Save.
However, for my Network Load Balancer, I cannot select the "Edit security groups" option. It is greyed out:
How to edit its security group then?
Currently requests to the NLB cannot be delivered to the EC2 instance in the target group, because of security group configurations.
Why can't I edit??