Router/Switch/FW or any layer 3 device will always try to match using the longest prefix first and then check the other less specific or summary routes.
for an eg. if you have the routes as below:
ip route 18.104.22.168 255.255.255.255 22.214.171.124
ip route 126.96.36.199 255.255.255.0 188.8.131.52
Any traffic going towards 184.108.40.206 will go towards 220.127.116.11 and any other traffic destined towards
18.104.22.168/24 except for the host 22.214.171.124, it will use the other link towards 126.96.36.199
this way you can utilize multiple outgoing links, if required
still the answer would be the same
it will look for the longest prefix match and if you are sending traffic towards 188.8.131.52, then it will chose the first route in your config as it matches it perfectly
but if you send the traffic towards 184.108.40.206 or 220.127.116.11 and so on...it will chose the second route because the first route is not an exact match
it's not a question of which is gonna be processed first but which of these 2 entries will be used to forward a packet to a certain destination and as these are 2 different prefixes( prefix-length) then the longest match will get used.