You’re almost there. You actually have two separate issues being discussed here: Photoshop “increasing” the file sizes of JPEG images, and an error when using Save for Web.
Photoshop “increasing” file sizes: That one’s already been discussed, but I think it’s useful to restate it. It is very common to think Photoshop is making JPEG (or other compressed) images too big, but the reality is the reverse. The natural file size of any image is what it says in the Image Size dialog in Photoshop, and that’s determined by the number of pixels and number of bits per pixel. The only reason it seems so much larger in Photoshop is that Photoshop un-compressed the compressed JPEG back up to its natural size so that it could edit it. But because everyone is used to seeing highly compressed JPEG file sizes and not uncompressed file sizes, they think Photoshop made the file size go up, when actually Photoshop is simply uncompressing the image to its natural size.
Save for Web error: This is completely unrelated to the issue above. This has to do with the pixel dimensions of the image (width in pixels and height in pixels, such as 3000 x 2000 px). Save for Web is very old code, written for when original images were much smaller. The large images coming out of today’s cameras have pixel dimensions so wide and tall that Save for Web sometimes can’t cope. To fix this, Adobe completely rewrote their web/mobile export code in the form of the newer command, File > Export > Export As. If you are getting that Save for Web error, try saving the same image out of the Export As command instead, which should be able to handle it easily with its more current code. By the way, that is why the Save for Web comnand has the word (Legacy) after it, because that old code is basically deprecated now, and at some unknown time in the future, Adobe is expected to remove Save for Web (Legacy) from Photoshop.