If $k\geq 46$, then let the piles have $a_1=a_2=... =a_{45} = 44$ and $a_{46} = 39$. It is clear that it is impossible to satisfy the condition above.
So $k\leq 45$. We will show that $k=45$ work. Let the number of stones in the piles be $a_1\leq a_2 ... \leq a_{45}$.
We will apply the following algorithm:
Start with $i=45$, if $a_i\geq i$ then split the pile into two piles containing $i$ and $a_i - i$ stones.
If $a_i < i$, then $\sum_{j=1}^{i} a_j \leq (i-1)\cdot i \implies a_{i+1} + ... + a_{44} + a_{45} \geq 2019 - i^2 + i$. If for all $i+1\leq k \leq 44$, we have $a_k < i$, then we would have $a_{45} \geq 2063 - 44i$ and so $a_{45} - (45 + 44 + ... + (i+1)) \geq 2063 - 44i - 1035 + \frac{i^2 + i}{2}\geq i$, so we would be able to split the remaining part of $a_{45}$ to two piles one of which contains $i$ stones. If for some $i+1\leq k \leq 44$, we have $a_k\geq i$, then we just simply split the $a_k$ pile into two piles one of which contains $i$ stones. So this algorithm always works and at the end of the algorithm we will have piles that contain $1, 2, 3, ... ,45$ stones, also we can delete the remaining piles. We are done.