If you want to know how to build a Prolog . . .
When I learned Common Lisp, I devoured the available textbooks in 1989 and for a few years after. A book from the early 1990s is: Paradigms of AI Programming: Case Studies in Common Lisp. By Peter Norvig (now employed by Google)
The book first teaches you Common Lisp, which isn't that difficult to pick up. But that itself is a transformative experience.
Then the book shows you how to build a number of amazing things using Common Lisp. It starts IIRC, with pattern matching. Term rewriting. Unification matching.
Then you proceed to build a few things like:
1. A program that solves high school style algebra word problems.
2. A "prolog" (but expressed in Lisp syntax) that is a "hair's breadth" (in the author's words) from real prolog.
This book was mind blowing. A revelation. Insightful.
Learning Lisp (even from other textbooks before the one I mention here) was a transformative experience. But this single book stands out in providing so many amazing ideas expressed in Lisp.
Other Lisp texts I had read taught me things like playing two-player zero sum games (TicTacToe, Checkers, Reversi). I abstracted the technique to have a single re-usable AI engine implementing the Minimax with Alpha-Beta pruning, and then different layers on top of that which implemented different games (as listed earlier) by defining a game board, move generator and board scoring function.
One Lisp textbook I had from the late 1980s showed a program to plan movements of a robot arm to manipulate blocks according to english like commands.
All of these amazingly sophisticated things take up very little Lisp code. Often only a few pages.
The journey of learning Lisp, with a really good textbook, is an amazing learning experience. Learning Lisp will change the way you think about code for the rest of your entire life. I can confidently say that having learned Lisp starting in about 1986 and dabbling with it through 1993. The initial learning comes quickly. But you will play with this new toy for a long time.
Another book (The Elements of Artificial Intelligence Using Common Lisp) introduced me to the A-star search. I've used that technique, in Java, to build a "solver" for a game sometimes called "Traffic Jam" or "Unblock Me".
I think there is ongoing effort to update it for better accessibility.