You can find multiple perspectives on this topic in these threads:
Here is a helpful book on the topic of early Buddhist texts specifically, called âThe Authenticity of Early Buddhist Textsâ: