It will depend much on youyour investments and ofc on the amount you are going to invest.
As aA possible rule of thumb is that if your alternative investinvestment gives you a higher yield than paying off your student loan you should do that. An even better solution is to find an investments, e (e.g. high yield funds, dividend stocks,) which could contribute to your monthly cashflow that. That could also be a solution.
And of course you have to do an evaluation of your risk profile. The safest bet, imo, is to pay ofoff debt first then invest. OfcOr you could do both. Knowing the market youryou're considering investing in is a key to considering the risk of your investments, and it also reduces the risk.
Deepening on the rates of your bank accounts, at least in my country, that’s not an option at the moment, when with inflation the yield is "eaten" up by the inflation.