Time dilation is due to speed, not acceleration. In essence time-dilation quantifies the tilt of the object's world-line relative to your temporal axis at any specific time. Acceleration quantifies the curvature of the world-line.
What follows is a more technical explanation, which I can expand further if you think it is helpful.
I prefer to think of it geometrically. Imagine that you plot in spacetime all the events that correspond to an object, i.e. the position of an object at time 0s, 1s, 2s, etc. The collection of such points will give you a world-line of the object (https://en.wikipedia.org/wiki/World_line).
To work with this world-line you need to parameterize it. A convenient way to do it is to say that the time and position of the object are given by $\left(time,\, position\right)=\left(ct\left(\tau\right), \mathbf{r}\left(\tau\right)\right)$, where $\tau$ is the proper time.
Next you could consider the tangent to the world-line $u^\mu = \frac{d}{d\tau}\left(ct\left(\tau\right), \mathbf{r}\left(\tau\right)\right)^\mu= (c\frac{dt}{d\tau}, \frac{d\mathbf{r}}{d\tau})^\mu$. This is known as four-velocity. What is the projection of this tangent onto your temporal axis? This is like a dot-product of the tangent vector with the unit-vector along your time-axis in your spacetime diagram. The projection is $(1, \mathbf{0}). (c\frac{dt}{d\tau}, \frac{d\mathbf{r}}{d\tau})=c\frac{dt}{d\tau}$. Now this projection is essentially the time-dilation. Usually we denote $\frac{dt}{d\tau}=\gamma$.
It is relatively easy to proove that $\gamma$, the Lorentz factor, that is directly related to time dilation, is a function of object velocity irrespective of acceleration, but I am not sure you are familiar with four-vector formalism necessary to show this.