"はじめまして" vs "よろしく"
What's the difference between はじめまして and よろしく ? They both mean "nice to meet you", as i know
This is a great question, and unfortunately the answer isn't that simple.
I would rather say that はじめまして and よろしく are both used in the scenarios that we would say "Nice to meet you" in English. However, "Nice to meet you" is not the literal meeting of either of those words.
初めまして is essentially a more formal version of 初めて, and means something along the lines of "the first time". It is said when we would say "How do you do?" or "Nice to meet you" in English, usually at the very beginning of an introduction. It is only said to someone the very first time you meet them.
よろしく is part of the phrase よろしくお願いします, which also doesn't have a great analog in English. It is used when you are asking someone's favor. よろしくお願いします is a phrase that is very often used when asking someone to do something in Japanese, or literally asking them for a favor. When it is used in personal introductions it is generally reciprocated, and both people are asking each other for their favor, even though the favor is somewhat non-specific. I have seen it translated as "please treat me well" or something like that, which sounds strange in English, because we don't say it. However, it is this mutual request for each others favor that expresses a sentiment of goodwill for the start of a relationship.
When meeting someone, in a more formal setting, it is very common to use both of the phrases.
Informally, one or the other are often skipped, but not always.
はじめまして is a form of verb 始める - To start/begin. It's like saying "We are meeting for the first time". You would say this when you first meet someone at the start of the conversation.
よろしく is the adverb form of adjective 宜しい - well/proper/good. It's like saying "please take care of me/be kind to me" and would be at the end the introduction. This you can use in many different situations, especially when asking for favors. English doesn't really have a proper common expression for this so it often gets lumped into the "nice to meet you" phrase even though its meaning is quite a bit different and is more versatile in its use.
I was thinking to comment (a minor quibble) that the proper kanji for はじめまして is 初めまして I was taught this in school many years ago. However, it turns out that 始めまして is also technically correct. That said, the majority of people under 80 are likely to use 初めまして, and may think 始めまして doesn't work, so it might be better received as 初めまして.
For intermediate+ Japanese learners, you can check out these discussions on the topic:
I've always been told that when used as an expression it's usually written in kana alone. That probably somewhat quells the war between kanji preferences, lol.
the closest translation of よろしくお願いします is "please take care of me". Other comments have already explained the more exact meaning of the phrase though, so I won't bother going over it again. 初めまして is "for the first time". Unlike よろしく, you would only say it in an instance of an initial meeting. If you listen, you'll probably hear よろしく in everyday speech, and even more so at more formal occasions. I've had to make a fair amount of speeches in Japanese, and you'll find yourself saying the phrase A LOT, sometimes to the point of redundancy. It's more of a formality than anything else.
'Nice ot meet you for the first time' and 'keep being nice from now on' would be easier to remember and distinguish. Yoroshiku can be used in other situations e.g. when you ask somebody to take care of something for you.