Cognitive Semantics and Formal semantics seems to exist. Which is more popular in the field of semantics? Why can not they replace each other?
Cognitive and formal semantics can coexist very easily. They not only have different goals but also different objects of study.
Formal semantics grew out of formal logic and is concerned with a very limited set of statements that can be truth conditional (about which the truth can be determined). Formal semantics is not much concerned, for instance, with lexical meaning but looks mostly at combinatorics at primitive units. Formal semantics is the natural choice for people working in rule-based natural language processing.
Cognitive semantics is just a particular perspective on more traditional semantic concerns and tries to root meaning in human experience of the world which it finds in human cognition. It does not deal with primitive units of meaning and therefore is not concerned as much in their combinatorics. However, it looks at how meaning is constructed in speech, so it is not limited to small scale utterances. As such it is more difficult to formalize and use directly in natural language processing.
Both of these approaches to semantics co-exist with more general semantics which looks at both lexical and relational phenomena in language as they are found rather than through a specific lens but borrows from both of these as needed. Modern stochastic-based NLP is more likely to draw on both as appropriate, as well.
Cognitive semantics strives to reduce regularities about meaning (in the broadest sense) to informal and non-grammatical facts about cognition, and formal semantics attempts to give a symbolic and grammatical account of a proper subset of that sense of "meaning". Per se, they are logically exclusive, though a formal semanticist can accept the functional explanations proposed by cognitive semanticists for why meaning properties in language are what they are, and still maintain their theories of what they are in grammar.
Formal semantics is simply a (set of) metalanguage(s), a (set of) formal system(s) of representation, and is compatible with any 'ontologically substantial' theory of meaning, no matter whether meaning is all in the mind, as 'conceptualists' (e.g., present-day cognitivists and Chomskian minimalists) believe, or all outside the mind, as radical 'realist' referentialist theories of meaning traditionally claim, or partly in the mind and partly in the extramental world, as 'dualist' theories say, or even all in Language itself, as in the 'immanentist' approaches of early structural semantics inspired by people Saussure, Hjelmslev or Coseriu, or Katz, and arguably by Chomsky himself for as long as he believed in a non-trivial Faculty of Language. This list, of course, is not exhaustive, it does not quite capture Frege's 'idealist-realist' view of sense, nor Quine's hybrid behaviourist-conceptualist view, nor the late Wittgenstein's conception, nor Putnam's view, etc., but the point is just that formal semantics is not a theory of meaning in the sense all those are or were. The 'entities' (sets, functions, possible worlds, whatever) that the 'alphabet' and the well-formed formulae of formal semantics 'denote' may, ontologically speaking, be 'anywhere', so to speak. No wonder, then, that it should be able to co-exist with any conception of semantics. You can do 'formal semantics' starting from a cognitive semantics perspective. Obviously, to the extent cognitive semantics works with fuzzy categories, representing its analyses according to the rigid standards of 'formal semantics' may be less straightforward, but the conceptual-methodological difficulties defining and operating with fuzzy categories may raise are the cognitive semanticist's concern, not anything 'formal semantics' itself should worry about. Whether formal semantics is ultimately adequate or not to model meaning in natural languages is a different matter, but the same question can be asked with respect to cognitive semantics or any other 'substantial' theory of meaning.