I am trying to look for a subset of stellar particles in different snapshots in TNG. But I don't understand how to use snapshot.loadSubset without downloading the information of all the particles in the snapshots. Is there a way for downloading only the particles with some ids in the snapshots?
You can download particle subsets based on FoF halo or Subfind subhalo/galaxy. There is an example of such "cutouts" in the web API getting started guide.
It isn't possible to download particles by their ID. You would have to download all stars, possibly only some particular fields of stars (i.e. their IDs, masses, ...) following "Task 11" of the API cookbook.