You are asking to use Visual Studio 2022 to edit SWI prolog files.
Visual Studio tends to be much better at working with Microsoft supported languages (C#, C++, etc) and not as helpful with languages like Prolog. You won’t find SWI prolog in the Visual Studio extensions.
If you want to proceed anyway, I suggest you use File-Open-Folder, and browse to a place where Prolog files are found. Then in the solution files pane you should see Prolog files and you can see them. But there won’t be support beyond basic text editing.
Personally I recommend using Visual Studio Code instead [ this is a completely different product from Visual Studio ], because if you install Visual Studio Code, you will find Prolog extensions for that tool.