IIRC Cmd+shift+4 by default stores to a file, but it is easily changeable in settings. Mine has been set to store to clipboard since a long time ago (since i mostly ever take them to send to someone in chat or to insert into my own notes, for which clipboard is exactly what i need).
To change it: open Screenshot app (either cmd+shift+5 or from the app launcher), click Options in the center bar, and set "Save to" to "clipboard". Now, all screenshots in the future will be going by default to clipboard. You can also pick many other destinations for saving, including any arbitrary directory or many other apps (e.g., mail, preview, etc.).
After some googling TIL, apparently if you use Ctrl key modifier with any screenshot shortcuts (cmd+shift+3/4), it will store to clipboard regardless of your setting. Kinda nifty for those who switch between storing to file/clipboard all the time.