Keep a notebook next to you and write down the thing you want to look at later. Keep doing what you were doing, but now you haven't "lost" that idea, you've just filed it away. Then once you're done with what you originally wanted to learn/do, consult the list for the next thing.
Also works with browser bookmarks, dev.to reading list, github stars, medium bookmarks, etc. Just have some method of filing ideas so they are postponed rather than distracting you now.
We’re a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.