For large datasets, using limit + offset doesn't always perform well, especially when the offset value is large.
Instead, you can use a cursor-based pagination where you filter by the order values.
There is a reason services like GitHub handle pagination this way!