die by (something)
To die from a particular cause. That neighborhood is very dangerous, and I don't want you to die by gunshot!
die by something
to perish by a particular cause or device. (Often refers to execution as a death sentence.) He died by electrocution. She was condemned to die by hanging.