Rectangular shapes in cylinders with subdivision surface
Adding the rectangles separately is probably easiest. If you are stuck on adding it into the topology, here is what I got by using mark sharp, edge creases, and the cast modifier with a vertex group. (the base topology is simple enough to be self-explanatory)





If you want to remove all n-gons, you can add two loops and line them up with the top and bottom of the box. Then knife cut between them to get this:





One more trick...use the data transfer modifier to fix normals: