Hi!
Please configure in the SW/RT you do not want to be receiving the routes:
ip prefix-list [word] permit 0.0.0.0/0 ge 19 le 19 <<< this would drop EVERY route /19 in the route table so change the 0s for the actual subnet you do not want to receive
route-map [word] deny 5
match ip address prefix-list [word]
route-map [word] permit 10
router ospf x
distribute-list route-map [word] in
Hope it helps, best regards!
JC