Issue with move_and_slide method

I’m trying to recreate asteroids, the issue I’m having is that the ship is moving up automatically without even getting input for some reason, specifically on the move_and_slide method that’s causing it

extends CharacterBody2D

@export var speed = 10
@export var speedRotation = 5
var inputRotation = 0
var inputForward = false
var shoot = false

	
func getInput():
	inputRotation = Input.get_axis("r_left","r_right")
	inputForward = Input.is_action_pressed("forward")
	shoot = Input.is_action_just_pressed("shoot")
	
func moveShip(delta):
	rotate(inputRotation*speedRotation*delta)
	if inputForward:
		print("move towards")
		velocity = transform.x * Input.get_axis("down","forward") * speed
	else:
		move_toward(velocity.x,0,10)
		move_toward(velocity.y,0,10)
	move_and_slide()
	

#Wrap Ship on screen
func wrapScreen():
	if position.x <= -33.5:
		position.x = 830
	if position.x >= 833.5:
		position.x = -30
	if position.y <= -33.5:
		position.y = 830
	if position.y >= 833.5:
		position.y = -30

func shootBullet():
	if shoot:
		var shBullet =  preload("res://Scenes/bullet.tscn").instantiate()
		shBullet.global_position = $Setting/Spawn.global_position
		shBullet.setAngle(global_rotation)
		get_parent().add_child(shBullet)

#Function runs every frame that work with stuff that isn't involved with physics
func _physics_process(delta):
	wrapScreen()
	getInput()
	shootBullet()
	moveShip(delta)
	

move_toward() doesn’t do anything in your code, because the return value isn’t assigned to anything.

Try using

velocity.x = move_toward(velocity.x, 0.0, 10.0)
velocity.y = move_toward(velocity.y, 0.0, 10.0)

or

velocity = velocity.move_toward(Vector2.ZERO, 10.0)