Input.GetAxisRaw("horizontal") not working

whenever I move moveHorizontal is always 0 how can I change this?
//setting up variables
private Rigidbody2D rb2D;

private float moveSpeed;
private float jumpForce;
private bool isJumping;
private float moveHorizontal;
private float moveVertical;

void Start()
{
    //defining variables
    rb2D = gameObject.GetComponent<Rigidbody2D>();
    moveSpeed = 3000000f;
    jumpForce = 60f;
    isJumping = false;

}

void Update()
{ //input for left right movement
    float  moveHorizontal = Input.GetAxisRaw("Horizontal");
    moveVertical = Input.GetAxisRaw("Vertical");

    Debug.Log("moveHorizontal " + moveHorizontal);
    Debug.Log("Velocity " + rb2D.velocity.x + " " + rb2D.velocity.y);

}

void Addforce()
{
    //function that adds a force to rigidbody
    rb2D.AddForce(new Vector2( moveHorizontal * moveSpeed, 0f), ForceMode2D.Impulse);
   

}

private void FixedUpdate()
{
    if (moveHorizontal  > 0.1f || moveHorizontal < -0.1f)
    // if moveHorizontal is greater then 0.1f or if moveHorizontal is less than -0.1f then put a force to a rigidbody
    {
        Addforce();
    }
}

Tweaked your code a bit and I was able to get horizontal movement. Let me know if this is along the lines of what you’re looking for. Hope it helps.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Move : MonoBehaviour
{
 private float moveSpeed;
 private float jumpForce;
 private bool isJumping;
 private float moveHorizontal;
 private float moveVertical;
 Rigidbody2D rb2D;
 void Start()
 {
     //defining variables
     rb2D = GetComponent<Rigidbody2D>();
     moveSpeed = 900f;
     jumpForce = 60f;
     isJumping = false;
 }
 void Update()
 { //input for left right movement
 Addforce();
     //float  moveHorizontal = Input.GetAxisRaw("Horizontal");
     //moveVertical = Input.GetAxisRaw("Vertical");
     //Debug.Log("moveHorizontal " + moveHorizontal);
     //Debug.Log("Velocity " + rb2D.velocity.x + " " + rb2D.velocity.y);
     
 }
 void Addforce()
 {
     if(Input.GetKeyDown(KeyCode.D))
     {
          rb2D.AddForce(new Vector2( 1, 1f), ForceMode2D.Impulse);
     }
      if(Input.GetKeyDown(KeyCode.A))
     {
          rb2D.AddForce(new Vector2( -1, 1f), ForceMode2D.Impulse);
     }
     //function that adds a force to rigidbody
    //rb2D.AddForce(new Vector2( moveHorizontal * moveSpeed, 0f), ForceMode2D.Impulse);
    
 }
 
}