Route filtering needs to match both address and mask length — ACLs don’t. Prefix-lists do:

ip prefix-list PL seq 20 permit 10.0.0.0/8 ge 16 le 24

Matches any 10/8 subnet with mask between /16 and /24. Exact match = no ge/le. 0.0.0.0/0 le 32 = everything. Top-down, sequential numbers, implicit deny at the bottom.

The tool stack for OSPF specifically

Rule of thumb: prefix-lists for routes, ACLs for packets — and never let the implicit deny surprise you.