The rules are effective immediately. However established connections that e.g. were allowed and are now supposed to be denied, will continue to work because OPNsense is a stateful firewall. You would need to clear the state table in this case.
Changing rules from block to allow should be applied immediately, changing from allow to block requires resetting the states as allowed traffic remains allowed until the states are expired or killed.