The order is dependent on who is loaded first. Starting from FreeBSD 13.2 there is also pfilctl(8) utility which allows changing order of firewalls in runtime.
Note that usually the order on output is reversed than on input - that is, for one firewall to be "upper" and other "lower", if packet path is drawn as stack: walking from wire/bottom via firewalls to kernel/top on input, and from kernel/top via firewalls to wire/bottom on output.