Almost one meaning
All four words are translated as “but”. In conversation ama is enough. A beginner meets fakat and ancak in texts more often than uses them.
ancak and yalnız also mean “only”
Both words can also be adverbs. Before the word it limits — a number or a time word — ancak means “only”: Ancak iki kişi geliyor — “Only two people are coming”. Yalnız in the same role also means “only”: Yalnız sen biliyorsun — “Only you know”. It has one more meaning, “alone”: Yalnız yaşıyorum — “I live alone”.
Two kinds of “but”: ama and dA
English “but” also sets two people side by side when nothing unexpected is said: “I am coming, but he is staying”. Ama is used when the second part goes against what is expected. When two people are simply set side by side, the particle dA goes after the second subject: Ben geliyorum, o da kalıyor — “I am coming, but he is staying”.