Text/video tutorials would be helpful. I am new to GDScript and Godot. I tried to apply the minimax algo but didn't seem to work.
https://www.geeksforgeeks.org/minimax-algorithm-in-game-theory-set-3-tic-tac-toe-ai-finding-optimal-move/
I think you need to give us something that is actually done, rather than let us make something for you We can give you suggestions for modification.
I just made a simple Tic Tac Toe game that uses the minimax algorith with alpha-beta pruning. Check it out, it's all open-source: https://gitlab.com/apotaurus/minimaxalphabeta