best way to store user data for a html / js website? [closed]

building a basic forum website from scratch and was wondering what was the best way to go about storing the users data, eg: usernames and passwords for sign up forums and then accessing them when logging in again?
(im using js and html)

i tried using local storage as a temporary solution but this wont be used for long term use, ive looked a little bit into using something like mongo db or my sql but never found a good guide on how to use them and what their use cases are for.