An EAN is a 13-digit barcode identifying a specific product in a specific size or color. So every product (variation) needs it’s own EAN. Is this mandatory? No, if you manage your own sales through your own webshop, an EAN is not obligated. When you want to sell through a platform or reseller an EAN is a must, otherwise the platform can not identify your products. EAN should not be confused with an SKU, where a EAN is unique outside your webshop and identifies the product and the seller, a SKU identifies a product and its properties.
There are several plugins and extensions on the market for adding a valid EAN.