If they are 2 seperate units, then yes, I would recommend a shelf between them. Reason being that the top of ovens are often not flat, and compared to the front face, the overall top side sits lower to allow air to circulate around the top of the unit. You wouldn’t be able to sit them one on top of each other directly. Also, some over doors need a little space below them for the door to pivot properly. My oven would not be able to sit flat on the floor as when I open the door, the bottem section of the door pushes down on the floor its sitting on. Its only a few mm, but its something to look out for. My oven unit is a NEFF.
If its a single unit of a main oven, and a smaller oven above it (often refered as a tall oven) then they fit as one on a single shelf.