You can only have 22 abilities on a GF. Every GF also has exactly 22 abilities that they learn naturally. When you use an item to teach a GF an ability, something will eventually get pushed off of their list before you can learn it. That said, abilities don't vanish forever when they get pushed off the list. You'll just have to delete something else to get those abilities to reappear on the list.
You can delete abilities using Amnesia Greens available from Pet Shops, with the first opportunity to get them being the Pet Shop in Timber. If a GF had an ability to get pushed off the list, the unlearned ability will reappear if you use an Amnesia Greens to delete another ability from that same GF. Just note that deleting prerequisite abilities like HP+20% will prevent abilities unlocked by learning those, like HP+40%, from appearing even if you make space on the list. To get those unlearned abilities to reappear, you have to use an item to reteach the ability to the GF. In this case, you would have to reteach HP+20% to the GF in order to get HP+40% to appear on the GF's list as learnable.
You also don't want to delete any unique abilities that can't be retaught with items, or else those and any of the abilities unlocked by learning them are gone forever. A general rule of thumb you can follow is that if you don't see an item reteaching that ability in a shops list or you don't already have one in your inventory, you shouldn't delete that ability. The safest things to delete are Item, Magic, Draw, and GF since every GF has these and you only need as many of these abilities for as many party members as you plan on having junctioned. The scrolls teaching these abilities are also relatively cheap, so it isn't a problem to reteach those if you mess up.