N4
こと
Converting a verb into a noun
近所の迷惑になることをしてはいけない。
You mustn't do things that bother the neighbors.
Explanation
「こと」 has 2 uses
1Nominalizer: the act of V-ing
After a verb, 「こと」 turns the action into a noun that can be a subject or object: 「日本語を話すことは難しい」 (Speaking Japanese is hard).
日本語を話すことは難しい。
Speaking Japanese is difficult.
近所の迷惑になることをしてはいけない。
You mustn't do things that bother the neighbors.
2Sentence-final こと: rules and instructions
At the end of a sentence, 「〜こと。」 states a rule or instruction, as in school rules or notices: 「大きい声で喋らないこと。」 (Don't talk loudly.)
大きい声で喋らないこと。
Don't talk loudly.
フォークじゃなくて、お箸を使うこと。
Use chopsticks, not a fork.