When using Dynamic Routing Protocols (Like OSPF) in this scenario Both the Router (R1) and the Layer 3 Switch (D1) are in a OSPF Routing Protocol Domain
R1 is using OSPF to advertise its two networks, 10.10.10.0/24 and 10.20.20.0/24