Noise when shifting

Three days ago my Outback started making this grinding/rattling (hard to describe) noise when shifting and cruising at low speeds. Is this the clutch or the transmission? No trouble shifting though. I got rear-ended by a big Lexus SUV last week, but wouldn’t think that would have anything to do with it. Just damaged the bumper a little.

If you revv the engine while parked, do you still hear the rattle? If so, crawl under the front bumber, look Just beyond the front bumper , where the exhaust pipes leave the engine. You’ll see some sheet metal shields wrapped over those pipes. Very often they are the source of the rattle. Tap on them to see if they move. Wrap a large large home depot band clamp around them and the noise will very likely be gone.