views – How do I display the parent node titles, whose child nodes are referenced through a paragraph?

I have two content types. The first content type has a paragraph field. That field contains an entity reference field for the second content type.

I created a view that displays all the nodes of the second content type. I want to also display the first content type’s nodes for with a reference to a node of the second content type.

I tried with relationships and contextual filters, but I don’t get the result I am expecting.

Can someone please guide me? Do I need to write some custom queries?