40 minutes is one sleep cycle. At 3-4 months your baby is just coming out of the fourth trimester phase (when sleep is passive) and progressing towards sleep cycles.
Linking sleep cycles independently is a skill, so it needs to be taught and learnt. It's not an easy progression for most babies. But now (at the end of fourth trimester) is the best time to learn.
Baby can't learn to link sleep cycles independently unless sleeping independently. So the first step is baby going to sleep in the place they stay asleep. So going from awake to asleep in the pram/cot, rather than going to sleep in your arms and then being put down already asleep.
The dummy will make that process much easier. As will going to sleep in something that moves (like pram or bouncer).
Once baby is then going to sleep independently, practice resetting. The key to a successful resettle is that baby goes from deep sleep to light sleep and back into a deep sleep. If baby actually wakes up after the light sleep, you've missed your chance and it's too late.
So catch baby going into a light sleep and respond. This might be a very slight "tell". An arm or leg moving, shift in position, face screwing up, hands forming a fist. Catch this very first sign and reinsert dummy and restart moving the pram. You may not get a successful resettle every time, but the more you practice the more times it will be successful. Over time more and more naps will get a successful resettle and then on from that more and more naps will extend into a second sleep cycle without you needing to resettle at all. Only then, once naps are consistantly longer and no resettles are needed, would I move to the static cots.
In the mean-time, many/most of baby's independant naps will be only one sleep cycle. This is ok and normal for this stage. Just reduce awake time between naps so that baby has more naps per day.