Where does the action happen?
Say 学校へ行きます and then 学校で勉強します. Point out that school is the destination in the first sentence and the place of study in the second.
1. Place + で gives the setting of the action
In 学校で日本語を勉強します, the place comes directly before で. The final verb 勉強します names what happens there. First ask ‘where does this action take place?’; the answer forms the block 学校で.
This location function appeared briefly in the Verb Bridge; here you develop it further. Compare it with category で in lesson 25. In スポーツで何が一番好きですか, で limits a category of choices. In 学校で勉強します, で marks a real place where someone acts. The noun before で and the final part of the sentence show the difference.
学校で日本語を勉強します。
スーパーで買い物します。
2. で is action location; へ is destination
With a movement verb such as 行きます, school is the destination: 学校へ行きます. With an activity such as 勉強します, school is the setting: 学校で勉強します. Do not choose the particle merely because you see a place; examine its relationship with the verb.
Both can occur in sequence: 学校へ行きます。それから、学校で勉強します. The first school is where you move to; the second is where you then study. 学校で行きます and 学校へ勉強します swap those roles.
3. どこで asks for the action location
Replace the unknown place with どこ and keep で: 図書館で勉強します becomes どこで勉強しますか. The answer puts a specific place in the same position: 学校で勉強します.
どこへ asks where someone is going; どこで asks where an activity happens. With 買い物します, this lesson seeks the shopping location, so use どこで買い物しますか.
どこで買い物しますか。
スーパーで買い物します。
4. Build time, place, object, and action
A calm beginner order is time → place + で → object + を → verb. This builds 毎朝、学校で紅茶を飲みます step by step: when, where, what, action. Not every part is always needed, but each particle remains with its own role.
あります can state that an event occurs at a place: 明日、学校でテストがあります. Here the test is what takes place at school. The final check stays with familiar activities and asks for no new verb form.
5. Match each place to the right activity
Read the existing dialogue about eating lunch at school, shopping at the supermarket, and a test at school. Do not find only the place word; pair it with 食べます, 買い物します, or あります each time.
Then return and replace both the place and the activity in one sentence. The final check states the intended relationship explicitly, so で and へ are chosen by meaning.