Marine heatwaves, increasingly frequent, impact marine ecosystems and services. Still, understanding how temperature affects observed responses remains limited due to complex interactions among temperature, abiotic and biotic factors, and community dynamics. Here we try to fill this gap by exposing simulated plankton communities to seasonal heatwaves of 4°C with a trait- and size-structured model that accounts for protists and the life cycle of copepods. Despite the short lifespans and fast growth rates of plankton, results show that heatwaves affect communities differently and for an extended period up to six years after their appearance. Temperature affects species physiology and ecosystem dynamics, directly and indirectly, shaping structure and biomass. Species traits, interactions, and functional diversity under changing temperatures emerge as pivotal. Our study advances mechanistic insights into marine heatwave impacts, highlighting the complex connections between temperature, species traits, and ecological interactions.