An error line in a log hardly ever explains itself. The lines just before it usually do, and Select-String can print them next to the match.
Select-String is PowerShell’s answer to grep; the docs themselves compare it to grep in Unix and findstr.exe in Windows. With -Context it captures lines before and after each match.
Select-String -Path C:\Temp\app.log -Pattern 'error' -Context 2,3
With two numbers, the first is the count of lines before the match and the second the count after it, so this prints two lines before and three after. With one number, that count is used on both sides. In the default display, the matching line starts with a > character, and the lines around it are unmarked.
Because the pattern is a regular expression, you can search for more than one word at once, and the docs say that several patterns in an array return matches for each:
Select-String -Path C:\Temp\*.log -Pattern 'error','failed' -Context 1
If the text has characters that mean something in a regular expression, such as a dot or a question mark, add -SimpleMatch and the pattern is searched as plain text. Matching is case-insensitive unless you add -CaseSensitive.
The docs describe a detail that surprises people: -Context does not change the number of objects that come out. There is still one match object per match, and the context lines are stored in its Context property. When two matches are close together, the overlapping lines appear only once in the display. And if you pipe the result to another Select-String, the second one searches only the matched line, so -Context is not valid on the receiving command.
The caveat is that -Path needs files. If you pass only a folder, the command fails, so add a wildcard such as *.log, or pipe from Get-ChildItem.
Further reading: Select-String