1. No matter your reason for leaving the group, it helps to keep it vague and focused on yourself. Any further detail you share has the potential to spark drama and normal defensiveness. With a friend or partner, it is important to bring up what might be bothering you to talk about it and see if you can reach an understanding, compromise or solution. If the dynamic of a group isn't working for you, multiple people changing is less likely and it might be better to just move on.
You can always give a more detailed neutral explanation if members of the group message you privately later. You don't have to mention how long you're leaving for either. Giving the possibility it might be a temporary exit softens the news and as time goes on, it usually won't matter if you rejoin or not.
2. Reassure everyone that you're ok so they're not worried something happened to you.
After sending the message, simply exit the group chat.