What you need:
Choose a language to start with: Lua, C# or JS.
Understand the basics of the language you choose.
Get a editor: Notepad++,…
Follow this guide: [How-To] Create a basic script
Read the Doc’s
Become best friends with this: https://runtime.fivem.net/doc/reference.html
And look in scripts, try to understand them.
The only way to learn scripting in FiveM is by practising.