Depends on your source. I’m sure there’s some context on which that’s true.
If we’re talking the transphobic author’s world, a male witch is a wizard. Warlock, there, is a title kinda like “knight”.
In D&D a warlock is a person who gets magic by forming a pact with an otherworldly patron, like a devil or fey. A witch has meant different things at different times, but probably most strongly conjured images of an old-looking hag brewing potions with a familiar.
According to IRL wiccan lore a warlock is an evil male practiser of witchcraft, while a witch can be male or female.
Other contexts will have other explanations, I’m sure.