1) By - সহিংসতা, তরবারি, মহামারীতে মারা যাওয়া বুঝাতে by হবে।
Those who died by the sword were more fortunate than those who died of hunger.
2) In - হাসপাতালে এবং এক্সিডেন্টে মারা যাওয়া বুঝাতে in হবে।
At least six people have died in the accident. He later died in hospital.
শান্তিতে মারা যাওয়া বুঝাতে in হবে। Cambridge
I would like to die in my sleep
যুদ্ধে মারা যাওয়া বুঝাতে in হবে। উল্লেখ্য যে যুদ্ধ এবং সহিংসতা আলাদা দুটো বিষয়।
This is the cemetery of those who died in the First World War.
3) Of/From রোগ, অসুস্থতা, ক্ষুধা, পিপাসা দারিদ্র্যের কারণে মারা গেলে of এবং from হয়।
She died of / from hunger / cancer / thirst / a heart attack / her injuries
Those who died by the sword were more fortunate than those who died of hunger.
বৃদ্ধ বয়সের কারণে মারা গেলে of হবে।
She died of old age.
ক্ষতের বা আঘাতের কারণে মারা যাওয়া বুঝাতে of/from ব্যবহৃত হয়।
The cyclist died from his injuries.
4) For - দেশের জন্য অথবা কোন কারণে মারা যাওয়া বুঝাতে for ব্যবহৃত হয়।
He died for his country.
5) At - ঝুঁকির মধ্যে মারা যাওয়া বুঝাতে at হয়।
Sources - Oxford, Cambridge & Merriam Webster Dictionary and Common Mistakes in English by T J Fitikides.