I put myself in a position where I could contribute to mathematics without needing to publish. I don't suggest spending half your time on MathOverflow as a career substitute or career booster. However, thinking about a variety of problems allows you to make connections to things you have studied and to define and modify your areas of interest. Good participation on this forum can be a contribution to mathematics.
Alain Valette was kind enough in a paper to mention an example https://mathoverflow.net/a/64754 of mine to a question of his. It is a contribution on a small scale, but one of a growing collection of mine based on my activity here. I encourage you to share some of your contributions here, through questions, answers and comments. It will prepare you for the kind of contribution off MathOverflow that you may wish to make.
Gerhard "Come And Join The Party" Paseman, 2019.08.24.