Let $V$ be a Banach space and $(0,T)$ a time interval. Consider the space $C_0^\infty(0,T)$ of infinitely often differentiable functions with values in $\mathbb R$ and compact support in $(0,T)$ and the space $L^2(0,T;V)$ of square Bochner integrable functions.
It holds that $C_0^\infty(0,T)$ is dense in $L^2(0,T;\mathbb R)$, see, e.g., Cor. 4.23 in Brezi's book on Sobolev Spaces and PDEs .
Does a related result hold in the Bochner space setting, namely, is
$$ C_0^\infty(0,T)\cdot V := \left \{ f_v\in \bigl((0,T)\to V \bigr) :\quad f_v=\phi v, \quad v \in V,\quad \phi \in C_0^\infty(0,T)\right \} $$ dense in $L^2(0,T;V)$?
No. First you should observe that $C_0^\infty(0,T) \cdot V$ is not a subspace. For two (not colinear) vectors $v_1, v_2$, the function $f(t) = \chi_{(0,1/2)}(t) \, v_1 + \chi_{(1/2,1)}(t) \, v_2$ is cannot be approximated.
The set of all finite linear combinations of functions from $C_0^\infty(0,T) \cdot V$ is dense in $L^2(0,T; V)$.