There are so many different variables introduced by frame, handlebar, and saddle geometries that I find it easiest just to ignore all of it and measure everything relative to the bottom bracket.
On the “source” bike, find the measurement between the centre of the bottom bracket and where you put your hands. This is your reach. Note that some places on the internet would say the reach measurement would be to the end of your stem, but this ignores the fact that different handlebars can put your hands further/closer to the bottom brackets. your hand position is ultimately what you care about.
Next, measure the vertical difference between the centre of the bottom bracket and the top of your handlebars where you put your hands. The easiest way to do this is measure the distance between the floor and your bottom bracket and the floor and your handlebars and then subtract the two. This is called your stack.
To transfer it over, just adjust the new bike to match your stack and reach measurements as closely as possible.
Saddle height is easy to transfer, since as long as you’re using the same pedals, shoes and crank length, it will be the same on both bikes. Saddle setback is harder since different saddles have different lengths and I find my default position on different types of saddles is slightly different. I’m not sure if this is the “right” way, but I measure from the back of the saddle to my hand position on the source bike and then transfer that to the new bike, but only once I’ve already set up the stack, reach and saddle height. I find that gets me in the ballpark for saddle setback and then I make small adjustments from there.