In order for a rigid body to report collisions, you must enable "Contact Monitoring" and set "Contacts Reported" to a value greater than 0.
Some other comments:
You cannot move a rigid body by setting its linear velocity directly like that. You must apply forces or impulses, because a rigid body is controlled directly by the physics engine, not by you. See Physics Introduction: RigidBody2D and the RigidBody2D documentation for more information.
Also, it looks like you've been using old tutorial material for pre 3.0 versions of Godot. You don't need to set input processing, or use
set()/get() on object properties.
Lastly, you don't need to put
pass everywhere. It literally does nothing.