how to track object movement speed 2d

Hi . In my game this far I have a object that spawns in to the game .I dont apply any move force to it it only have RigitBody 2d on it and box colider .
Is there any way to calculate movement speed in space ? I need to calculate move speed to determine impact damage once object has collided with other object. So higher move speed will result in gigher damage number . Only problem is how do I find out speed of that object before it collides with other object ?

you can get magnitude of velocity:

float mag = GetComponent<Rigidbody2D>().velocity.magnitude;

You could subtract their position Vectors, it will result in a new Vector that indicates the force and direction of impact. Multiply this with Time.deltaTime to see how much force/second it has. It’s a framerate independent measurement. Please do keep in mind relativity. An object moving downwards with 100 units/time colliding with an object moving upwards with 100 units/time will result in an impact of 200 units. But when the 2nd object is not moving, aka 0 units/time, it will have an impact of 100 units.

Kind regards,