I am gonna use python/pygame to make my game I know that there is a way to make your game playable for anybody by using pygbag library but I have a hard time making it work can someone help me.
Not sure what you mean. I've used pygame with pygbag a lot and the basic example pygbag gives works fine. You just need to use 'pygbag --archive <folder or .>' command and it zips everything for you and you just upload the zip to itch and set the right settings for being a web game
So when I do run the command "pygbag--archive ." it dose create a zip but when I try to open the html file in web folder but it doesn't work you know how to fix?
Yeah that's common you get a CORS error trying to just open the html so you basically need a server to serve the files. If you want to see it locally you just need to run the command without the --archive flag which is really only needed for the final build to upload the zip here.
Using it without the --archive flag should start it up on localhost:8000 for you to view or you can go to localhost:8000/#debug to see the debug console along side the game