I think sometimes its just a bit of luck if a video goes viral, I think if we knew a guaranteed way of doing it then we would all have viral videos all the time. I would say just make the best content you can and be sure to make the most of your tags / descriptions and share it on other platforms if you can.
Most of the times it's an unexpected thing... there are videos out there that became viral just because many people found three seconds of the whole video hilarious