"Офис" is used for the "building" meaning of "office". It's a fairly new word in Russian. And we used to say "контора" back in the day (nowadays контора has some disrespectful, ironical connotation).
Head office - Головной офис.
Our company has a new office - У нашей компании новый офис.
"Кабинет" is more appropriate for the "room" meaning of "office".
E.g.: The manager's office - Кабинет директора
One can use "офис" in the "room" meaning of "office" too. But it would sound a little bit foreign.