The standard S1 and S2 heart sounds (lub and dub) are created when the valves snap shut.
The Wiggers diagram is the best representation of this and one always presented when first learning cardiac physiology. I suggest searching for one (easy to find) if you are trying to understand the timing of the mechanical and electrical components of the cardiac cycle. Many diagrams will also include the heart sounds, pressures, and volumes.
S1 is the closure of the AV valves at the beginning of systole and S2 is the closure of the semi-lunar valves at the end of systole/start of diastole.