for fpc mode you used Generics.Collections instead of fgl as I did, may I know what the difference is?
The difference is mainly that generics.collections is compatible with Delphi, but fgl is much older and stable. Those are libraries and there are many more, like std-fcl, which mimics the C library of the same name and lgenerics, which is also very good, probably the best regarding theory. The last one you currently need to install.
For now I would stick with FGL. It is very powerful and very stable.
The others I mentioned are even more powerful, but less suited to start with in your case.
You can always ask questions here.