Step 1: Go to Google Trends to see what's popular. On their homepage it will show what's going viral right now. If you write content that is just starting to go viral, you'll be able to ride that wave and increase the chances of your content going viral too.
Step 2: Go to Buzzsumo and type in keywords within your space. You'll see the most popular content within your space that went viral. Take the top viral pieces and write more detailed version than what worked in the past on Buzzsumo.