In terms of learning to code.
These’ll pretty much be your go to resources when it comes to coding in Lua with FiveM. I’d also advise learning C# instead if you have extra time.
[How-To] Create a basic script – Important
[Release] FiveM Natives - Snippets/Completions for Sublime Text, VS Code, Atom, & Notepad++ – I suggest Sublime text or Visual Studio
https://docs.fivem.net/
http://www.dev-c.com/nativedb/
https://runtime.fivem.net/doc/reference.html#_n_CFX
https://paste.ubuntu.com/24355443/ – List of Weapons
https://alexguirre.github.io/animations-list/ – List of Animations
As for frameworks you can reference. [Release] EssentialMode base Is a good framework to reference when creating your own framework.
ESX is a jumbled mess. I would suggest not references all of it, parts of it are alright.