You don’t have to desolder the headers from the small module. One approach is to solder standard headers (male or female – your choice, there are benefits to each) into the small modules.
While prototyping, you can use “Dupont cables” to make connections to other PCBs, or you might plug the small module (with its headers) directly into a breadboard.
When you have decided on the final design, you fit equivalent opposite-gender headers onto your final PCB / perfboard or whatever. Then plug the small module with its headers, onto those opposite-gender headers which you have soldered onto your final board.
When you are planning this, think about which gender of headers are most suitable for you on each side (module and final board), and which way “up” you want the small module to be, when fitted to the final board.
Read More: Prototype PCB Assembly
#PCB Assembly #PCB Testing