Say how you do something
で marks the means — the tool, method, or transport you use to do something.
JLPTN5
means + で (by / with something)~ de
by / with (means)
Put で after the thing you use: ペンで書く (write with a pen), でんしゃで行く (go by train), はしで食べる (eat with chopsticks). It answers "by what means?"
Tips and Common Traps
Hana· Key point
If you can ask "with what?", it's で.