Whenever you hear about a terrorist attack being stopped before happens, that is because a law enforcement agency found people online and began to encourage them to follow through on planning to commit a terrorist attack.
https://theconversation.com/canadian-law-enforcement-agencies-continue-to-target-muslims-208444
This is very common across law enforcement agencies around the world
https://scholarship.law.upenn.edu/cgi/viewcontent.cgi?article=1182&context=jcl
https://www7.austlii.edu.au/nz/journals/NZLawStuJl/2015/7.pdf