Neither of the two is necessary. It is not necessary that if you love a girl before marriage, that love disappears after marriage, and it is also not necessary that if you like a girl without talking to her and marrying her, this marriage will fail.
Failure in the first case may occur if love is purely instinctive and lustful love only, because after obtaining the desired pleasure, the flame of this lust will be extinguished, and you will request it from another source, while if love is based on understanding, intellectual inclination, and cognitive homogeneity, even to some extent. What, usually success will be an ally in this relationship.
In the second case, the marriage may also fail because it is also based on admiration for the apparent beauty, and therefore Islam calls for the two parties to sit with each other before the contract in the presence of a mahram, so that the two parties get to know each other and their inclinations before making the decision to marry, to ensure the success of the marital relationship.