WebM vs MP4
WebM usually produces a smaller file at the same visual quality. MP4 plays on devices WebM has never heard of. That is the whole trade.
Where they came from
MP4 is an industry standard that has been supported by essentially every device, player and editor for two decades. WebM is an open format built for the web, typically carrying VP9 or AV1 video.
YouTube stores most uploads in both, which is why a download tool can often offer you a choice.
The practical difference
At the same perceived quality, a WebM file is commonly 20–30 percent smaller than the MP4 equivalent. That is a real saving on storage and on data.
But support is narrower. Older smart TVs, car entertainment systems, some video editors and parts of the Apple ecosystem handle WebM poorly or not at all, whereas MP4 is accepted everywhere without question.
Which to take
Take MP4 unless you have a specific reason not to. The compatibility is worth more than the saved megabytes for almost everybody, and it is the format that will still open in ten years.
Take WebM if you are storing a large archive, you know your players handle it, and the space saving across many files actually matters to you.