I recently created a villager farm (one that breeds villagers to get more) but my first two villagers wont breed. One usually will have hearts but the other wont and this will cause them no not breed so both villagers now don't have hearts, but then the villager who wouldn't get the hearts now has them but the villager that did have them now won't get the hearts. This continues forever in a loop. The villagers are a toolsmith and a farmer, I've traded with both of them, farmer's inventory should be full, there is a third villager underground where the doors are also placed. plz help
I don't know how long you've waited but when there are only two breeding villagers it can take quite a while for them both to become willing at the same time, you should fence them in next to each other, or lock them in a small house, so that when they do they are sure to be close enough to breed.
Of course it's possible that there is some server setting that keeps them from breeding, I don't know if they would show hearts in that case.
Or if you are playing in Bedrock/Better Together I believe there is a limit to how many villagers there can be, perhaps as low as 10, you should ask in the Bedrock section of the forum: