@Muzammil_069506 Security Role definitions are solution-aware and, therefore, you can include them into your solutions and deploy as normal across environments.
Team definitions, and the Security Roles associated to those Teams, are not solution-aware. So they do not move across environments with solution deployments.
You can, however, treat Teams and the Security Roles assigned to those Teams as data in Dataverse. But you would need to build custom deployment logic to move this configuration between environments. This is because the Teams live at a Business Unit level and the Security Roles at replicated at each Business Unit in the organizational hierarchy. You, therefore, need to ensure that you assign the Business Unit specific variation of each Security Role to each Team. The Dataverse tables relevant to this area are businessunit, team and teamrole