You've seen two types of monotonic stacks:
Monotonic decreasing (biggest on bottom): finds next greater element. Pop when current is larger.
Monotonic increasing (smallest on bottom): finds next smaller element. Pop when current is smaller. Choose based on what relationship you're looking for. "Next greater" uses decreasing. "Next smaller" uses increasing.