You use mainly when mentioning the main reason or thing involved in something.
primarily , principally , chiefly , largely
I don't play golf, mainly because I'm no good at it.
我不打高尔夫球,主要是因为我不擅长。
The birds live mainly on nectar.
这种鸟主要以花蜜为食。
The stock market scandal is refusing to go away, mainly because there's still no consensus over how it should be dealt with.
此次股市丑闻历久不散,主要是因为在如何处理此事上尚无共识。
You use mainly when you are referring to a group and stating something that is true of most of it.
The African half of the audience was mainly from Senegal or Mali.
观众中的一半是非洲人,主要来自塞内加尔或马里。
The staff were mainly Russian.
雇员大部分是俄国人。
the mainly Muslim country.
这个以穆斯林为主的国家。
a mainly elderly population.
一个以老年人为主的人口。