Yes. Baby pillows are designed by keeping the baby’s delicate head in mind.
They cause less pressure on the baby's head and provide enough support to prevent flat head syndrome.
That's why baby pillows are often used in the cots and baby cribs.