How long to keep newborn/baby sitting up?

Hope

After feeding. I know holding a baby for a long time can spoil them but the sooner I lay my newborn down after feeding, the more he spit up.