If you want the room back after a guest leaves, measure what the bed leaves behind when it folds away. A low cabinet can free up the wall above it but still project into the room. A tall wall bed can give you more open floor, provided the room and the building can take the installation.
Compare the closed footprints first

A cabinet bed usually looks like a low chest or sideboard. Inside, a folding mattress stores in sections. A wall bed, often called a Murphy bed, pivots into a tall enclosure. Compare the depth from the finished wall to the front of each closed unit, including handles and any gap at the back.
In a room with a desk, sit down and roll your chair back as you normally would. Mark where the front of the bed cabinet would be. A few inches at that point may matter more than they do in the rest of the room.
Read the installation manual before you buy

A wall bed needs the mounting and structural support specified by its manufacturer. Get the manual for the exact model and find out whether your wall or floor can meet those instructions. Get written permission from your landlord if the installation alters the apartment. Use a qualified installer when the instructions require one or when you can’t confirm the supporting structure.
Some cabinet beds are designed to be freestanding, while others require restraints. Confirm which type you’re buying. Follow the manual for anchoring, leveling and clearance, and never operate an unsecured unit that requires mounting.
Plan for the full opening path

Tape out the closed body and the bed’s full projection from the wall. Include any drawer or support that has to extend before the mattress unfolds. On a vertical wall bed, also check height and the arc the frame moves through. A horizontal wall bed trades some open depth for more width along the wall.
Check whether the door, desk chair and bedside area still work when the bed is open. Try making the bed from the accessible side. If the only route out passes through the space the bed needs, choose a different layout before choosing a model.
Check the mattress and the edge height

Many cabinet beds use a folding foam mattress. Lie across its joins and check that the platform supports you where the sections meet. For a wall bed, confirm the allowed mattress dimensions, thickness and weight, since the lift is designed for a specific range. Even a mattress that physically fits can be too heavy or too thick for the bed to close correctly.
Check how high the open bed sits and whether a guest can get up from it comfortably. Ask the maker whether any mattress upgrade you’re considering is compatible.
Try the setup and put away routine

Imagine opening the bed just before someone arrives. Do you have to clear the cabinet top, roll a desk chair away or put on the fitted sheet each time? See whether the maker allows bedding to stay on in the closed position and where pillows can go. Try the mechanism in person when possible. Find out whether you can open and close it comfortably without help.
Price the whole job and plan for a move

Compare the bed price with mattress, delivery, assembly, mounting and any approved repairs needed when you move out. Check what arrives as a single piece and measure the tightest door or stair turn on its route. Even a freestanding cabinet bed can be heavy and awkward to move.
Choose a cabinet bed when the closed chest fits your daytime room and the folding mattress suits your guests. Choose a wall bed when you can install it as directed and the available floor space is worth the taller enclosure and installation. If both meet those checks, choose the one you can set up without rearranging the room every time.