Create a cube, subdivide it (smooth), cut it in half, separate the top from the bottom with V (Rip).
Move one half up, select the bottom edge of the top half and the topits middle edge of, bevel it, select the bottom half, press right click (context menu) > LoopTools > Bridge Edge Loops.drag it down.