This page in our Little Nightmares 2 guide has information about the door puzzle. You will come across it in chapter 5.
The doors puzzle is in the fifth chapter. Most of the doors have a bright purple light.
You will see the first such door in a narrow hallway. This hallway also has cabinets, but they aren't important. There is one thing you should focus on during this entire sequence, and that is sound.
You must only enter the door from which you can hear a melody! Listen to it very carefully – if you enter the wrong door, you will have to start from the beginning.