Best way to create component from existing board

I have a Kicad project of a complete board (schematic + layout).
This board is a plug-in module, with holes and headers.

The goal is to create my own component (symbol + footprint) to use this module in my “carrier” board.
I know how to make them from scratch of course, but here I wonder if there is a “smart” way to create at least the footprint from the existing layout without measure all the distances, diameters, etc… by hand.

I believe you could use StepUp to import the board in FreeCAD and generate a footprint. Almost sure that @maui posted a video about this, but I could not find it.

Yes it is very easy!

Open KiCad gerber viewer (the black icon; GBR)
Open gerber plot files, if you can’t find any in the directory make sure the filter thing in the bottom of the file picker is set to all files (*) at least on ubuntu 20
then go file > export to pcbnew and follow the instructions it gives you, it can be quite tricky to know which layers to export and as what but remember that gerbers do not have any net info so you cant get the track data really

I only use this functionality to export size & hole locations etc

there is also a script to convert a pcb to a footprint:

From just a few days ago: