Setting Velocities through Input

With my code as it stands here the “Left” command and animation work fine but the “Right” Command does not.

using UnityEngine;
using System.Collections;

public class PlayerController : MonoBehaviour
{
    public float speed;
    private bool moveR;
    private bool moveL;
    private Animator animator;
    private Rigidbody2D rb;
    void Start()
    {
        animator = GetComponent<Animator>();
        rb = GetComponent<Rigidbody2D>();
        

    }

    void Update()
    { 
        bool right = Input.GetKey("right");
        bool left = Input.GetKey("left");
        if (right||left)
        {
            rb.velocity = new Vector2(0, 0);
        }
        
        
        if (right)
        {
            moveR = true;
            rb.velocity = new Vector2(speed, 0);
        }
        else
        {
            moveR = false;
            rb.velocity = new Vector2(0, 0);
        }
        animator.SetBool("runright", moveR);
        //
        if (left)
        {
            moveL = true;
            rb.velocity = new Vector2(-speed, 0);
        }
        else
        {
            moveL = false;
            rb.velocity = new Vector2(0, 0);
        }
        animator.SetBool("runleft", moveL);

    }
}

My goal here is that I want the object to immediately be at a certain velocity upon pressing left or right then immediately stop when the button is released or if both are pressed at the same time. I do not understand why but only the “Left” input works as it stands. I am in 2D mode if that information helps. Thank you for your time.

It is a bit messed up but see if this works

 void Update()
     { 
         bool right = Input.GetKey("right");
         bool left = Input.GetKey("left");
         if (right && left)
         {
             rb.velocity = new Vector2(0, 0);
         }
         
         if (right)
         {
             moveR = true;
             rb.velocity = new Vector2(speed, 0);
         }         
         
         if (left)
         {
             moveL = true;
             rb.velocity = new Vector2(-speed, 0);
         }
         else
         {
             moveR = false;
             moveL = false;
             rb.velocity = new Vector2(0, 0);
         }
         animator.SetBool("runleft", moveL);
         animator.SetBool("runright", moveR);
 
     }

let me know if this works