I wanted to replace the part of texture with another texture using raycast hit ?
Raycast Hit can be used to get the targeted pixel coordinate of your texture, you could then set up a grid centred around that pixel which is the size of your new texture (in pixels) and set the old texture’s pixels to be the pixels of your new texture. The code here is a good starting point: Unity - Scripting API: RaycastHit.textureCoord
To use that code you would then need to look at nearby pixels on the old texture and update their colours by referencing the pixels in your new texture.