When it comes to deciding, which is better to be used, a top-level collection or a sub-collection, please note that neither of the two is better than the other in terms of speed or billing. However, there are slight differences that can make you choose to use a top-level collection over a sub-collection. So the only differences might come from the way we are structuring the database, rather than performance. This is because Firestore is as fast as it is at level 1 is also at level 100.
Let's assume we have the following structure using subcollections:
Firestore-root
|
--- shops (collection)
|
--- $shopId (document)
|
--- products (sub-collection)
|
--- productId (document)
This schema can also be designed as:
Firestore-root
|
--- shops (collection)
| |
| --- $shopId (document)
|
--- products (collection)
|
--- $productId (document)
|
--- shopId: $shopId
When it comes to NoSQL databases, a recommended practice is to have the database flattened. Why? Because it looks more organized and each top-level collection contains only documents that are tied to the collection itself.
When it comes to sub-collections, when we look at the above example, each product is tied to the "products" sub-collection, $shopId, and "shops" collection.
Regarding security rules, the complexity comes with the number and diversity of filters you need to use. However, for top-level collections, it's a little easier.
In the end, bear in mind that when we are talking about architectures, we are always structuring a Firestore database according to the queries that we intend to perform. So it's up to you to choose between these two options and see which one of them can make your life easier.
Edit:
As also the docs state regarding structure Firestore data:
Root-level collections are good for many-to-many relationships and provide powerful querying within each collection.