は is a topic marker. It marks the topic of a clause or sentence(s). A topic is often the same as the subject of a clause, but not always.東京は日本の首都だ (Tokyo is the capital of Japan). → the topic = the subject東京は車が多い (In Tokyo, there are a lot of cars). → the topic not = the subject

が usually marks the subject of a clause or sentence.東京が日本の首都だ (Tokyo is the capital of Japan). → が marks the subject.が also introduces the object of a verb.東京が好きだ ( I like Tokyo). → が introducing the object.