Question
What scripts run when your cloud instance is initializing?
If your server is provided by a cloud provider then it's almost certain that before your instance is booted there are quite a few scripts that are run as a part of the initialization process for your instance. This capability is usually provided as a part the so-called Cloud-init package.
Cloud-init is a set of init scripts for cloud instances. Cloud instances need special scripts to run during initialization for various pre/post-boot-time tasks such as retrieving and installing ssh keys, setting up special devices, running application-specific commands and many other similar tasks. These scripts would probably vary from cloud provider to cloud provider, nevertheless, it's still possible to see all or a sub-set of these init-scripts in case they have been implemented using the Cloud-init package.
Answer
One or all of the following commands would usually reveal what these init-scripts are:
ls -a /var/lib/cloud/instances/`cat /run/cloud-init/.instance-id`/scripts
find /var/lib/cloud -type f -executable -print
find /var/lib/cloud/ -type f -print | xargs file | grep -Ei "(\bscript\b)"