how is ddr4 controlled on the laptop
DDR4 is RAM memory which in almost any PC is connected to the memory controller. That memory controller sits either in the "North bridge" chip (older designs) or in the CPU itself (almost any laptop supporting DDR4).

Even when the RAM connects directly to the CPU (chip) it does not connect to the CPU (core) directly. There will be a memory controller in between. That memory controller will simply be a circuit included on the same silicon die also used for the CPU (core).

The type (specification) of the memory is not directly related to where the RAM connects to. The memory controller determines which type of memory is supported. Changing from DDR2 to DDR4 doesn't mean the memory needs to be connected differently, it means the controller needs to support the memory type that is used.

Also read more on Wikipedia