Vet visits can be stressful for you and your cat, but at least it’s possible to teach your cat to love the carrier that you use for the trip.
Put the carrier in your house a few weeks before you’re planning a vet visit and fill it with blankets and cat toys. Take the top off and add treats to encourage your cat to sit in it.
Over time, put the top back on and close the door with your cat sitting inside it for a few seconds. Reward your cat with treats for entering the carrier on its own.