We have the form
y = Asin (Bx) + D
A = the amplitude = 6
B = 2pi / period
The period = 4
So
B = 2pi / 4 = pi/2
D = the shift up/down.....since the resting position is y = 0....we have no shift
The equation for the displacement from the resting position is
y = 6 sin [ (pi/2) t ]
Here is the graph : https://www.desmos.com/calculator/jn8ipp0b2g