How can i work out what is triggering my panic attacks?

Ive wrote a few things in a diary but is there a better way to work out for sure what has been causing them? x