Can I write off a stock sale gain from an inherited IRA (short term) against a long term stock sale loss in a different Rollover IRA?

both transactions are done in the current 2023 TY