I could write a force $\vec G$ as a vector $\vec G = G\,\hat g$ where $\hat g$ is the unit vector in the direction of the force and $G$ is the magnitude of the force.
In this equation $G$ is always positive because it is the magnitude of the force.
Now suppose that a force $\vec F$ acts parallel to the x-axis and the unit vector in the direction of $x$ increasing is $\hat x$.
In this case the force can be written as $\vec F = F \,\hat x$ where $F$ is called the component of the force in the $\hat x$ direction.
The important difference from the previous notation for the force $\vec G$ is that now the component $F$ can either be a positive or negative value.
A force $3\, \hat x$ has a component $3$ in the $\hat x$ direction ie it is a vector of length (magnitude) $3$ in the positive x-direction.
A force $-5\, \hat x=5(-\hat x)$ has a component $-5$ in the $\hat x$ direction ie it is a vector of length (magnitude) $5$ in the negative x-direction.
—-
Your Newton’s second law equation is a vector equation $\vec F = m\, \vec a$ which can be written as $F \hat x = m\, a \hat x$ where $F$ and $a$ are components of the force and the acceleration in the $\hat x$ direction (positive x-direction).
Removing the unit vectors which occur on both sides toilets $F=ma$.
Now suppose the velocity is $7\hat x$.
A deceleration (reduction in magnitude of the velocity) means that the acceleration is in the opposite direction to the velocity and perhaps might be $-2\hat x$.
Using $F=ma$, remember this comes from $F\hat x = m \hat x$, you get $F = m (-2) = -2 m$ which tells you that the force acts in the negative x-direction (-\hat x) ie opposite to the direction of the velocity which is in the positive x-direction.
If the initial velocity had been $-7\hat x$ (in the negative x-direction) then a deceleration might be $2\hat x$ (in the positive x-direction).