A set of tires with 40,000 or more miles on them will be approximately 1 size smaller than when they were new. Think about it, the tread on most truck tires is around 1/2" or more. If you wear them down to 1/8" your tires will be about 1" shorter than when new. That is about the same as the difference between a 245/75/16 and a 265/75/16. If you have a set of 265/75/16's on a truck near the end of their life and decide to only replace the ones on the front you have a 31.5" new tires on the front and a 30.5" tires on the rear even though they are the same size.
Here is a good link to visually see the difference between different tire sizes and how it effects your speedometer when you change sizes
https://tiresize.com/comparison/There is also a gear ratio calculator option that you can click on to see how much changing tire size changes your actual gear ratio.
If your truck has 3.73 gears with a 31.5" tire; it will have 3.87 gears with a 30.5" tire.
With a 4X4, (if you plan to operate it in 4X4), you need to have 4 identical tires with very close to the same miles on all of them. Even with the same size if you were to only replace 2 of them and shifted into 4X4 it'd be the same as having 3.73 gears in the front axle and 3.87 gears in the rear. Is best to start with 4 identical tires and rotate them so they wear down the same.
A whole bunch of people are going to say I'm full of s_it.
That may be true.
Yep
Older 4wd vehicles had warnings about only using 4wd in slippery conditions,
That warning is still in the owners manuals of new 4X4 trucks. 4X4 hasn't changed all that much. There are AWD vehicles today, which isn't really new. Back in the 1970's and early 80's virtually all 4X4 trucks came standard with AWD with the option to lock into true 4X4. In fact you couldn't buy a Dodge, Chevy or Jeep truck without AWD. Only Ford continued to offer trucks without it.
4X4 and AWD are different, but AWD is much more forgiving. It is designed to allow all 4 wheels to get power and still turn at different speeds. 4X4 tries to force all 4 wheels to turn at the same speed. Having the same gear ratios front and rear along with the same diameter tires is pretty important. And operating in 4X4 on pavement, even wet pavement is a bad idea. Use it only on slippery surfaces.
When you go around a corner all 4 wheels take a different path and since the ones on the outside travel much farther they must turn much faster than the inside wheels. If you're on a surface that is slippery or has loose gravel, sand, mud, etc. the inside wheels will spin and slip some as you corner when you're in 4X4. They are now being forced to turn at the same speed as the outside wheels even though they have far less distance to travel. If they can spin freely there is no damage. If traction is good you risk breaking expensive parts inside the transfer case. Even if it doesn't break right away you are putting stress on parts and they will fail sooner than they would normally fail.