My flight ticket Edinburgh to Tashkent from Turkish Airlines and baggage allowance is 40 kg for all the way (Edinburgh-Istanbul-Tashkent). But, I want to stay in Istanbul for a few days, so I am going to change the date of the trip Edinburgh-Istanbul. My luggage allowance won't be charged if I collect my luggage and recheck it?
If you stay in Istanbul for a few days, you won't have a choice about collecting your luggage and rechecking: it will be mandatory. The airline will not hold your luggage for days.
Your luggage allowance will change to be whatever is allowed for Edinburgh-Istanbul and Istanbul-Tashkent separately. Turkish Airlines has a weirdly complex free baggage policy, with extra free baggage for frequent fliers and different amounts of baggage depending on fare, which is presumably how you wound up with a 40kg allowance. You would need to contact them to determine precisely what allowance you would have depending on your fare, as they do not publish a chart that shows all the exceptions.
If any baggage charges apply to your trip, you will need to pay the fees for both the trip from Edinburgh to Istabul and the trip from Istanbul to Tashkent, because several days in Istanbul will count as a stopover. The linked page has instructions for "Flights with a stopover" to calculate the total cost: find the fee for each portion of your journey and add them up. If you remain within your free baggage allowance, you will, of course, not be charged.