@riot1913 I think the drive expansion script only works on 1st boot, so as long as you connect the drive after the 1st RetroPie image boot, you shouldn't have a problem.
Alternatively, immediately after flashing the image, insert the card in the OS where you're done the flashing and modify the cmdline.txt file from the boot partition and remove the last parameter so that instead of
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=5728b712-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet loglevel=3 consoleblank=0 plymouth.enable=0 quiet init=/usr/lib/raspi-config/init_resize.sh
you should have
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=5728b712-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet loglevel=3 consoleblank=0 plymouth.enable=0 quiet