I know in the below "by" is more suitable than "with", but with is also used as means, so what is the criteria to choose between the two for means?
ex)They communicate with each other by(with) email.
Not much difference. You can add "through" to the mix. Or even "via."
Use the one that sounds better to you.
I'm not a teacher, but I write for a living. Please don't ask me about 2nd conditionals, but I'm a safe bet for what reads well in (American) English.