Hi@akhtar,
When you try to delete that security group, you will get an error message which will give the ID of the resource that security group is attached to. Search with that ID, terminate or delete the resource (if not in use) and then try to delete the security group. If you don't terminate its dependency, it will not allow to delete security group.
Thank You