It depends on how high your ride height is now. The effect on rear ride height is variable depending upon the initial clock position of the eccentric chain tension adjuster which is why you should take a initial height measurement before making the change so you can reset it to the desired height.
Here’s a way to estimate the effect on wheelbase and ride height.
As delivered from the factory, a stock bike will have its ride height adjuster rod set in the lowest position. So the ride height can be raised from this position, but not lowered.
For a given length chain, and for rear sprockets in the range of 38 to 43-teeth, adding one tooth will DECREASE the distance between the center of the front sprocket to the center of the rear sprocket approximately 4mm.
This also decreases the wheelbase by a similar amount and raises the ride height. If the ride height adjuster is initially set in its lowest stock position then the way to compensate for this is by raising the front ride height an equal amount.
The eccentric adjuster has a limited allowable range of rotational adjustment. The rear axle should be confined to the lower rear quadrant.
A 5xx chain has a link pin-to-pin distance of 5/8-inch or 16mm. Links need to be added in pairs so adding two links increases the distance between sprockets about 16mm.
Also, note that for a given length chain, changing from a 15-tooth to a 14-tooth front sprocket will INCREASE the distance between the center of the front sprocket to the center of the rear sprocket approximately 4mm. This also increases the wheelbase by a similar amount.
So to answer your question.
First, measure your ride height.
Then, replace your 38-tooth with a 40-tooth rear sprocket. This will decrease the distance between sprockets about 2 x 4mm = 8mm.
Remeasure your ride height and you’ll see that you’ve raised your ride height a similar amount.
Decrease the length of your adjuster rod to lower the rear ride height back to the starting position. If it has never been adjusted it’s already at its shortest length. If it has been raised previously but cannot be shortened enough to get back to the desired ride height you’ll then need to replace the chain with another one 2-links longer.
Adding 2-teeth adds (say) 8mm ride height
Adding 2-links reduces (say) 16mm ride height
So now with a longer chain, when you remeasure ride height you’ll see that you need to increase the adjuster rod length (which you can now do) to recover to your desired rear ride height.