thing by yourself

When I asked someone giving me advice for something, I was told to “think it for yourself”. I think that should be said as “think it by yourself”…
can “think by yourself” still work

Neither of those work. It should be
Work it out for/by yourself
Think for/by yourself.

Was it a native speaker who said “think it for yourself”, and are you sure those were the exact words used? Neither “think it for yourself” nor “think it by yourself” are very natural expressions to me.

I might say “figure/work it out (for/by) yourself”, though this could sound rude without further softening words (such as “it might be better if you figured/worked it out …”).