I wrote a tool for that: https://github.com/simonw/files-to-prompt - and there are other similar tools like repomix.
These days I often use https://gitingest.com - it can grab any full repo on GitHub has something you can copy and paste, e.g. https://gitingest.com/simonw/llm