What is the cause of the knocking if tie rod change?

Perhaps a worn CV joint (usually more of a clicking sound when turning), but there are many components in the front end of a motor vehicle that could cause a knocking (or similar) sound, including suspension components, brakes, steering components and bearings.

Worn tie rods, by the way, do not normally cause a knocking sound, but result in very loose feeling steering and noticeable drift, especially at highway speeds. A knocking sound is more likely to be an engine problem, such as pre-ignition.

If you are not accustomed to diagnosing these sounds, you will best best off to see a qualified mechanic, or a friend who is more familiar with the front-end components of a motor vehicle.