Being warm while practicing yoga is generally useful as it relaxes muscles and helps open up the body. That's one reason why sun salutations are a key feature of a lot of yoga classes as those movements and the pace of the flow help to generate heat. However, in high summer or the middle of a heatwave when you are already very warm it might help to try these tips to avoid overheating.
Be well hydrated - throughout the day and before class - to help the joints stay lubricated and the body respond better to movements.
Try wearing looser clothing (rather than tight leggings, for example) so that air can circulate and the skin can breathe.
Try introducing more yin elements even within a vinyasa practice. You could slow down poses and movements, try more grounded variations (e.g. kneeling lunges), and 'cooling' poses (e.g. forward folds), use props and blocks for supported variations (e.g. backbends).
Be aware that if you come to practice and are already quite warm you might find your body more receptive to deeper stretches than usual, so be mindful, set yourself up well with a focus on stability around the joints, go for those stretches but be willing to back off if it starts to feel intense (overstretching can put joints at risk).
Stop and breathe if that's what you need to do! Sit down in child's pose for a moment and come back to the flow when you can. If you are in a class environment it might feel awkward but respect your body enough to honour what it needs.
Enjoy the season while it lasts!