const data: any = await db.listCollections();
I need to get only limited number of collections, you can say pagination. But I didn't find any firebase query with limit on getting collections . Because the db is design like this way that you have to get all the collections, and there is too many collections.
When using Firestore you should typically give your collections known names, so that you can repeat them in the client-side code, and generate the names for the documents.
The Firestore API isn't well suited for listing or querying collections.
I recommend pivoting, and storing the information that requires listing into documents, so that you can use the query and pagination APIs on documents.