How do I replicate this for my project?

Please could someone help in recreating this for my project with a few more added sections and able to contain the hover effect.

With help of @bob from Flux Academy, I got to know that the canvas is outside of the main div but I can’t somehow figure out the change to contain it.