1. Do differential transformation on your time series. Nonstationary sequences usually become stationary after differential transformation, but each time they are done, they will lose one degree of freedom.
2. Another advanced technology is called "cointegration analysis", that is, although two time series are not stationary, there is a long-term cointegration relationship between them. This is more advanced. If it is an undergraduate course, choose the method 1. If you are a graduate, please choose the second method.