A command spits out four screens of output and you want the start of it. Scrolling back and hunting for your prompt works, but Apple’s Terminal already marks every prompt line for you, and there are shortcuts to jump between those marks.
By default, Terminal marks a prompt line with square brackets when you press Return, Control-C or Control-D. You can check that under Edit > Marks, where “Automatically Mark Prompt Lines” should have a checkmark. Then these work:
Command-Up Arrow jump to previous mark
Command-Down Arrow jump to next mark
Shift-Command-A select between marks
Command-L clear to previous mark
The one I’d use most is Shift-Command-A. Run a command, press it, then Command-C, and you have copied exactly the output of that command. That’s handy for pasting a log or an error into a bug report without dragging the mouse across half the screen.
For a spot you want to find again later, there are bookmarks. Shift-Command-M inserts one, Option-Shift-Command-M inserts one with a name, and Option-Command-Up and Down Arrow jump between them. Edit > Bookmarks lists them at the bottom of the submenu, which is nice for a long session where you ran a test and want to come back to its output later.
The caveat: this is a feature of Apple’s Terminal app. Other terminal apps have their own ideas, or none. And be careful with Command-L: it clears everything back to the previous mark, so it is the quick way to tidy away output you no longer need, not something to press by accident when you meant to jump.
Further reading: Apple: Use marks and bookmarks in Terminal on Mac, Apple: Keyboard shortcuts in Terminal on Mac