Saying DF40 series is not enough to get good guidance, please write the manufacturer part number.
if you have any images that explains your request then it will be more helpful.
I used those connectors on my board to interface with the Arduino Portenta board which has also high density connectors (see image below).
Btw the technical name of these connectors is "Mezzanine connectors" or "board to board connectors" some people call it HRS connectors because of the name of the manufacturer.
" alt="" class="bbc_img" />