Never put anything in your luggage you can not live without, if you need to take something that is very important for you, keep it in your carry on.
As the other answers state, make sure you have enough time between flights but not too much. One to five hours are the numbers I have seen reported on this site more than once. If your layover is long, say 8 hours or more, your best bet may be to not check it through.
The rest of this answer is more how to lower the impact of luggage that does not make the same flight you do. And on how to get it returned to you when it does miss the flight.
Have one set of clean clothes (from the skin out) in your hand luggage or at least clean underwear, so that if your luggage is late, you can clean up with your own clothes.
When luggage goes missing, mostly it is just delayed and may follow you to your final destination the next day or, (depending on the airline and airport) can be collected the next day. Having some clothes makes you will not be caught out.
Make sure you have your contact details on and in the case, so that you can be contacted when they find the case without the flight labels. If you can be reached by phone while on holiday, put your phone number (in international format, so with the + and your country code) as the top line.
For the address, either put in your temporary address on the way out and your home address on the way home.
Or, if you have someone near home who will be home while your house is empty, their address and phone number.
There are many different kinds of suitcase labels available, (and you can even make your own if you can not find anything.)
And put the information inside your case.
And be sure to report your luggage missing, with the address and telephone number you can be reached.
Ask the staff of the lost luggage office what to do and what you get for not having your luggage right there. Some people report having been given nice amount of money to buy emergency supplies. (Others have reported not getting anything, so you will have to wait and see.)