It's worth noting interface routes, static routes, dynamic routes, and default gateway aren't separate steps. PBR is special because it can't control traffic originating from the firewall, but everything else is just a few steps:
- Find the most specific prefix in the routing table for the destination IP. If there is no prefix for the destination IP (meaning no default route and no route covering the destination), return destination network unreachable (ICMP type 3 code 0).
- Pick the ARP/NDP destination: If the route has no gateway, ARP/NDP for the destination address out the route's interface. If the route has a gateway, ARP/NDP for the gateway address out the route's interface.
- If no ARP/NDP response, return host unreachable (ICMP type 3 code 1). If you get an ARP/NDP response, frame the packet to that MAC and send it out the route's interface.
When you learn multiple routes for the same prefix, the administrative distance picks which one goes into the routing table (the FIB) in the OS. That's the only differentiation between static routes, dynamic routes, and the default gateway (not actually special, just a static or dynamic route for 0/0).
Interface routes are just routes without a gateway set (I've never seen a route with no gateway learned via dynamic routing, but I don't know offhand if it's absolutely impossible).