Get image and save to external USB

I would like to make an automation that queries my security camera for a snapshot and save this to an external USB.
The query is an HTTP request and returned image is a jpg.

I suppose the first question is how does Home Assistant interact with a USB and how does data get written to it?

I’m running on a Raspberry Pi 4.