After you install your debian VM and have it running. Inside your VM do this:
1. sudo apt update && sudo apt upgrade -y
2. sudo apt install build-essential dkms linux-headers-$(uname -r)
3. Go to the Devices menu and click on "Insert Guest Additions CD image" in the virtualbox menu.
4. Open the file explorer and you will see the drive on the panel. Right click the guest additions drive and open it in the terminal.
5. Use "ls" to see if VBoxLinuxAdditions.run is in the directory.
6. sudo sh ./VBoxLinuxAdditions.run
7. sudo reboot
8. Now unmount the optical drive. A warning pops up. Force eject anyway.
9. Optionally you can go to the devices menu and enable bidirectional copy and paste as well as bidirectional drag and drop. But this is not necessary to have the features for resizing your VM display.
Here is a reference article for guest additions from VBox. https://www.virtualbox.org/manual/ch04.html