Depending on what length and what type of stock you want, it might be easier to start with a rifle than a pistol.
I have several AK sbrs and I put them all together myself. The shortest is a mini draco with an underfolder. It wasn't expensive or difficult to add, but it is not the most favorite type of stock. I like it for what it is, but that's my preference.
If you like a more modern adjustable AR type stock, those are pretty easy to add. A more traditional folding triangle stock is quite a bit more work, especially if you want it to look nice and operate correctly. In that case, it would far easier to start with something like an Arsenal SLR 107-64.
Then you can cut the barrel. It is possible to purchase crowning and rethreading tools online from Dave Mason or places like CNC Warrior. I've used mine on a couple dozen rifles over the years, so the upfront cost per rifle ended up being just a few dollars. But even if you got a gunsmith to cut, crown, and rethread the barrel, it would still be far cheaper than paying him to install the folding stock.
So there's not one correct answer. It really depends on what you want the final gun to be and what you're going to use it for.
Az