There is currently no "standard" way to do cursor pagination, although it is a common feature request and we might implement something to help with this in the future!
I recommend using a code block to implement a while loop that calls a function (similar to this). Implementing a recursive multi-step function is also feasible and will not incur extra cost, but it might be harder to read (unless you prefer recursive style). If you need longer timeouts/data limits, you can also call workflow from workflow recursively, but each call will be counted as a separate run.