Very easy to end up with massive containers, and a lot of it it very nuanced by the order you do things, but also in choosing a starter image container that is too big/unnecessary.
For example, it's common to see people go for the standard Ubuntu image without actually thinking.
when I started with it, I did exactly that.
Until a colleague (and websites) pointed out I didn't need it.
We do a lot of APIs and whatnot.
Switched from Ubuntu image to Alpine image. Same functionality, not a massive size (depending on your requirements - c-libs are the issue here)