NostrGram gathers events from the top 100 relays real-time. You can see the list of the top relays here (the first 100 in that list are used to gather events, plus the new one from #[2] wss://eden.nostr.land)
https://nostrum.pro/search/#allrelays
Writes go to the top 25 relays, which you can see here (many are offline because of the current load):
https://nostrum.pro/search/#relays
There's no way in NostrGram to set custom relays yet. All reads come from the caching server I built (thus the massive performance benefit over being connected to a dozen relays). Writes (new notes and reactions) go to the top 25.
At some point I'll put in the ability to specify your write relays. I'm thinking through how to incorporate custom read relays alongside the cache server. Some of the features of NostrGram are possible only because of the cache server, so I have to plan how to do that. Right now I'm focused on adding all the features I want and working out the bugs, then I'll get to that.