Well first you should learn a programming language. The most common for Roblox bots I would say is python or JavaScript with node.js (I personally use node.js/javascript).
You then need to understand how the Roblox API’s work (either the internal ones or the external ones - The external ones are the Open Cloud).
I made some tutorials on both the main API but also the Roblox Open Cloud if they are of any help.
Depending on what bot your making then it may need to learn other things for example for a Discord bot you need the Discord API (or if u use node.js u can just use the package Discord.js as an easy way to use it).