Is it OK to separate male and female guppies

Males typically have a shorter lifespan than females, and it’s thought that this is because they spend most of their lives chasing and harassing females. So keeping 1 male to every 3 females helps to balance out the issues between both. (source)
https://www.youtube.com/watch?v=ZreVWE2hf8s
Generally, you should keep guppies in groups. And ideally, you should keep at least a trio of guppies in at least a 5-gallon fish tank. You can keep more than a trio of guppies but then you will also need to increase the tank size of your fish tank according to the number of fish you are going to keep in the tank. Oct 16, 2021 (source)
It is recommended that a pregnant guppy be removed from the community tank, or isolated in a part of it, in order to give birth to her fry. (source)
If you already have male and female guppies then you should separate them to stop them from breeding. Even when you see guppy fry in your fish tank, not all the fry are going to survive because guppies eat their own babies. Oct 21, 2021 (source)
After Your Fish Gives Birth For many species, it’s important to keep fertilized eggs and newly hatched fish, or fry, separate from the adults. Some fish eat their own young while others eat the young of other species. Keeping the fish eggs and fry separate from the adult fish may give them a better chance of survival. Jul 13, 2019 (source)
Yes, you can have two male guppies together. Male guppies have no problem cohabiting. With that said, male guppies can sometimes exhibit aggression towards other males. For example, they may chase each other to assert dominance or fight over a female. (source)