How to create a view that list all child nodes of current page? I have a content type "A" that has an entity reference field to content type "B".

I need to create a view that will be embed on "A" node page for listing all "B" nodes referenced to it.

I know I have to use contextual filters for getting the current node id and a relationship, but not sure exactly the recipe.
Create a view of content type B. (View Type Block)
Create a relationship in that view to the content that contains the reference field by clicking on add a relationship, and search for the name of your reference field)
Create a contextual filter to filter by ID using that reference field. Choose "Provide default value" then "Content ID from URL".
Display your block on the appropriate pages.