When you get to the airport, you’ll go to your airline’s check-in counter or bag-drop area. You’ll give them your ID and your flight information, and they’ll put a luggage tag on your suitcase and send it off to the plane. You’ll get a baggage receipt/tag, so keep that somewhere safe.
You don’t have to worry about your suitcase getting on the right plane — that’s what the baggage tags and airport baggage system are for. When you arrive at your destination, you’ll go to the baggage carousel listed for your flight and wait for your suitcase to come around. Just check the tag on the bag before you grab it, since there can be a lot of luggage that looks alike! (I like to put some obviously identifiable thing on mine like a luggage strap).
And since you’re worried about your luggage getting lost, I would suggest you put a tracker inside your suitcase. If you have an iPhone, an airtag is a great option. It won’t prevent the bag from getting lost, but you can use the Find My app to see where it is, which can be really reassuring if your suitcase doesn’t show up right away.
If you don’t have an iPhone, there are similar trackers made for Android phones. The important thing is to get one that’s compatible with the phone you use.
Put the tracker inside the suitcase rather than on the outside, and set it up before you leave home so you know it’s working. Also put your name and contact information on an outside luggage tag, AND on the inside as well.
Hope this helps. Enjoy your trip.