I don’t know how to set up C++ that I read it on the Godot documents and I still don’t get it how. An easier part is that I use J.E.N.O.V.A for making a C++ setup. It got an automatic installer to make it easier than manual. I went at the document of J.E.N.O.V.A. it was not great to know all and easier to learn.
You can use GDExtensions to write C++ for Godot, I’d recommend reading through the docs here so you understand what to do.
Then using this template to create a GDExtension using scons