Here is my code on doing some similar summoning with data.
private void spawnPreview(boolean invis) {
CompoundTag extraNBT = new CompoundTag();
extraNBT.putBoolean("NoGravity", true);
extraNBT.putBoolean("Invisible", invis);
extraNBT.putBoolean("ShowArms", true);
extraNBT.putBoolean("NoBasePlate", true);
preview = new ArmorStand(this.minecraft.player.getLevel(), 0, 0, 0);
preview.load(extraNBT);
}
I modified it slightly to get the right point across, but you need to add data to the summoned entity.