Having issues with the Serial Monitor needing to be opened for my entire code to work

Why a delay? Just curious.