Technically a modifier such as "only" or "just" should be placed immediately before the word or group of words that it modifies. So, it should be "I am here for only a few minutes."
In speech and informal writing, as you noted, "only" is often used as in your examples. To me, this is generally acceptable, as long as the placement doesn't generate confusion. Your first example does create confusion. As it is written, it would mean that making dinner for her family is the only thing she does, when what is probably meant is that she makes dinner ONLY for her family (and not others).
Also in some cases it just sounds better. Can you imagine the song "I only have eyes for you" as "I have eyes for only you"?
As with many grammar rules, I'd use the proper placement in formal writing and in all cases avoid placement which causes confusion.