Engine knocking repeatedly at stop, shuddering when changing gears at high speeds; 2002 Ford Escape

My car was sitting for a week in cold weather. I started it yesterday with no problem, but only waited for a minute or two before driving. I was driving at city speeds, and heard a knock. I was accelerating up a hill and it hesitated/ jerked once or twice. The check engine light came on, and now it knocks every few seconds when I am stopped at a light. It also doesn’t seem to catch the highest gear (5?) when it shifts, making a constant knocking sound and vibrating. Letting go of the gas or accelerating so it shifts back down makes the noise go away. In other gears it seems fine, with an occasional jump… It is an Automatic V6 if that helps at all. I am taking the car in Monday, but I would like to know possible causes.

This morning I let my car warm up for 40 minutes (15 minutes in park and 25 idling at the bus stop). The problem was no better.

By knock I meant it feels like someone bumped the engine. My foot vibrates on the brake for a second.
And when it changes into the highest gear, it shudders ( until I release or further press the gas pedal. The revs don’t change while it is shuddering or knocking

It sort of sounds like a xmission problem, which will take a shop to diagnose. But you could do a few things if you wanted. Monitor the engine temp guage when driving. Is it overheating? Check the oil, xmission fluid, and coolant levels. Are they ok? Post the codes when you know what they are, folks here may be able to interpret them for you.

Shaky operation and odd running has misfire all over it. 1 or more cylinders is not firing right. Is it ignition? Or something mechanical? Coil pack? Burned valve? Jumped timing belt? Newer OHC motors are prone to worn/loose timing belts.

I will update this on Monday after the garage reads the codes and can diagnose it. I’m worried that it is a clutch/transmission problem, since the issue is most prominent when changing gears or stopped.