Is it better to save money in bank or invest it online, in real estate or maybe gold?
Since "better" is a relative quality, I'm very tempted to say "it depends"

in particular, it depends on the personal preferences such as spending habits (now and in the future), risk aversion, etc. In any case though, as a trained financier the best advise I can provide is consider the risk-return profile of each particular investment and construct a diversified portfolio of several different types of assets so that their risk-return profiles mitigated the overall portfolio risk.
In this context, each investment has both advantages and drawbacks and can only be evaluated fully as a part of a diversified portfolio, e.g. having a deposit in a bank wouldn't hurt in any case, and banks don't tend to go bankrupt too often (and, there are governmental protection schemes for bank deposits in many countries) - however, the interest is really low these days, and yes, banks CAN indeed go bust, albeit infrequently. Real estate is a great way of holding a physical asset which you can actually touch, with easily understood value and that is hard to destroy - but it's far from being a liquid investment, and the returns manifest over long periods of time. Gold and other similar stores of value (like bitcoin for instance) have the advantage of being easily transferable (liquid) and hard to destroy at the same time, but their prices tend to fluctuate quite substantially.
To sum up, there's no "perfect" investment, the time-tested approach is a diversified portfolio that corresponds to your personal preferences and time/liquidity constraints.