There are a few reasons your front derailleur may not be shifting correctly. The most common reason is that the derailleur is not aligned properly with the chainrings. To check this, you will need to look at the derailleur from the front of the bike and see if it is lined up in the middle of the two chainrings. If it is not, you will need to adjust the derailleur.
Another common reason for poor shifting is that the limit screws on the derailleur are not set correctly. The limit screws control how far the derailleur can move in each direction. If they are not set correctly, the derailleur will not be able to move far enough to shift onto the larger or smaller chainring.
Lastly, if your chain is old or damaged, it can also cause shifting problems. A damaged chain will not engage with the teeth on the chainrings as well, which will cause shifting problems. If your chain is more than a few years old, it is probably time to replace it.
If you are still having shifting problems after checking all of these things, it is best to take your bike to a qualified bike mechanic for further diagnosis.