Hi,
I recommend to read some application notes about switch mode power supply PCB design.
Many semiconductor manufacturer provides them for free, because it is important.
In short:
The PCB layout, especially for power switch mode supplies, has big influence on overall performance.
If done correct, then the circuit may worke precisely with low heat generation and low noise emmissions.
If done wrong it may lead to oscillations, heat, short lifetime, overheat,
Simply eletcrically joining the parts does not work.
Klaus