"I prefer coffee."
Translation:Is fheàrr leam cofaidh.
Yes, that’s exactly the literal meaning. A little bit less literal (but still showing what happens here) would be I find coffee better. In Gaelic there are many idiomatic expressions of the type is ADJ leam X with the I consider, find X (to be) ADJ meaning, eg. is toigh leam X means I find X to be pleasant (ie. I like X, and acc. to Colin Mark is toil leam X is a newer spelling of the former¹), is binn leam do cheum sweet to me is the sound of thy footsteps, I find your footsteps sweet-sounding, is binn leam an naidheachd seo I find this news sweet-sounding, etc.
It’s a bit more regular in Irish where I like X is typically is maith liom X – I find X good; and I prefer then is the same with comparative: is fearr liom X – I find X better.
¹ as is toigh l-… sounds like is toil l- even though originally there was the adjective toigh rather than the noun toil, see Colin Mark’s Gaelic Verbs: Systemised and Simplified, ch. 10, §A.14, p. 182; although is toil leam X can be synchronically understood as X is my delight which also fits the meaning I like X