A full diff is too much when the only question is which files changed. Two options shrink the answer to a short list.
git diff --name-only main...HEAD
git diff --name-status main...HEAD
--name-only shows just the path of each changed file. --name-status adds a letter in front: A for added, M for modified, D for deleted, R for renamed, C for copied, T for a type change and U for unmerged.
The three dots in main...HEAD compare your branch against the point where it split off from main, so you see what your branch changed and not what main did meanwhile.
That list is easy to pass on to another command, for example to run a linter on changed files only:
git diff --name-only --diff-filter=d main...HEAD | xargs -r prettier --check
The --diff-filter=d part leaves out deleted files, which would otherwise make the tool fail. The caveat is quoting. Names with unusual characters are printed in quotes unless you use -z, which separates names with NUL bytes, so combine it with xargs -0 for such repositories. It also helps to remember that renamed files show up as R with a similarity score, which is the quickest way to see that a file moved rather than being rewritten.
Further reading: git-diff documentation