Keep your knife clean, dry, and ideally, out on the cutting board . Hone regularly.
If your knife is stainless, use very light strokes on a fine abrasive honing rod (ceramic or diamond coated) taking care to cover the entire length of the blade's edge evenly and hold a constant angle (a tiny bit more open than the angle at which the edge of your knife is sharpened (yes, you should find out what that edge angle is...)
If your knife is Carbon steel, use firmer strokes and a traditional butcher’s steel (very hard steel with longitudinal striations) and try to hold close to the edge angle of the knife.
If you’re inclined, learn to sharpen on a whetstone. There are a number of resources that demonstrate this process and while there is a bit of a learning curve, it will come quickly if you devote a small amount of time every day for a few weeks, and return the satisfaction of razor sharp edges whenever you need them.
The more you invest in your knife, from thoughtful choice to skillful use, to practiced care, the more it will return in terms of the pleasure of using an amazing tool and the satisfaction of improving your culinary experience in every way.