If you have access to the MATLAB R2020b and UAV Toolbox, you can find example demostrating how to control a multirotor to follow trajectories.
prj = openProject('uavPackageDelivery.prj');
The multirotor position controller is in the subsystem "uavPackageDelivery/Multirotor (MultirotorModel)/Inner Loop and Plant Model/Low-FidelityModel/Position and Acceleration Control". It consists of PID position control, PID velocity control and attitude control.
You can also find more about multirotor trajectory following controller in "Trajectory Generation and Control for Precise Aggressive Maneuvers with Quadrotors." by Mellinger, Daniel, and Nathan Michael.