This article has not been completed yet. However, it may already contain helpful information and therefore it has been published at this stage.

# Retrieving Root - Permissions
sudo su
# Updating package informations
# apt update
# Installing needed Headers
apt install build-essential dkms linux-headers-$(uname -r)
# Creating a folder structure to mount the CD drive
mkdir -p /mnt/cdrom
# CD drive mounting
mount /dev/cdrom /mnt/cdrom
# Change directory
cd /mnt/cdrom
# Running the install script
sh ./VBoxLinuxAdditions.run --nox11
# Rebooting
shutdown -r now
# Checking Installation (Service)
lsmod | grep vboxguest

Source:

https://linuxize.com/post/how-to-install-virtualbox-guest-additions-in-ubuntu/