losing sight of one's goal by indulging in trivial pursuits
A yojijukugo warning against distraction by frivolous hobbies or objects, causing neglect of important aims.
It is important not to lose sight of your daily goals so you don't fall into the trap of being distracted by trivial pursuits.
本末転倒 means putting the cart before the horse or mistaking means for ends, while 玩物喪志 specifically warns against being so absorbed in trivial amusements that you forget your serious purpose.
From the classical Chinese maxim 玩物喪志 in the 尚書, literally “indulgence in things destroys one’s purpose,” warning that excessive absorption in diversions can undermine one’s resolve.