It is not trivial to identify them. If it was then there would be no replication crisis. Avoiding is easy in theory: you need decide on math methods in advance. Generate random data before you start to gather real data, and write an R program to process this data. Test it, debug, and when you get real data just feed it to this program. Without changing the program. It is harder in practice though.
> understanding correlation vs causation
> I'd love more information on best practices especially for experimental design
I learnt it with experimental psychology. С. James Goodwin "Research in Psychology", there are some specific psychological topics covered (you might not be interested in ethics of psychological research), there are not a word about chi squares or other math methods you mentioned (data processing is out of the scope of the book), but there are a lot about different experimental setups, with a lot of examples. IIRC there is discussion of p-hacking too.
I believe this book is a good read to anyone interested in design of experimental and/or correlational research methods in general, not just for psychologists.