>>4115965There's a bit of technique to it, it makes it slightly easier but living bugs are always a battle.
Get the camera in manual focus, aperture priority. Focus on a thing that's similar in size to the bug you're trying to capture, a flower, a leaf something like that. once you have the focus as close as you want, you move the camera back and forth to get the bug in focus, do not try to focus again by using the optics or AF.
Shooting short bursts also helps.
Practice the technique with static things, then try to hunt some bugs in the wild.