I think I’ve heard someone else ask this same question before. Since your question reminded me of it, I updated both the A-Series Guide and B-Series Guide pages with a tip pointing out the pin constraint file.
If you are planning on porting your design to multiple FPGAs and FPGA boards, I recommend having a generic top-level module for your design. Then in the TinyFPGA template project’s top module you instantiate your design’s top level module. You could also instantiate FPGA-specific components like PLLs or clocks within the TinyFPGA template project so that your generic design doesn’t depend on MachXO2-specific components.