chatgpt is a crazy tool, it can give you a good starting point if you dont understand smth, ESPECIALLY when it comes to code. It wont write some crazy complex thing, but it gives such a good idea of how to do a little thing that you can implement into the rest of your work