The answer to this depends on how, exactly, you are using these terms. In general, however, the terms are interchangeable.
“Lawmaker” is a term that we can use in a democracy to refer to anyone who is part of the legislative branch. In a democracy, the legislative branch makes the laws. For this reason, we can call each person in that branch a lawmaker, even though they do not personally make the laws.
A “representative” is someone who represents other people. We generally use this term to describe members of the legislative branch. We elect these people to go and represent us in Congress or in our state legislatures. They act for us since we cannot all go and participate in making laws. Thus, a lawmaker and a representative are the same thing.
However, you may be thinking of a Representative, meaning a member of the House of Representatives. If this is what you are thinking about, the difference is that all Representatives are lawmakers, but not all lawmakers are representatives. The House of Representatives is one part of Congress. All of the people in it are called Representatives and are lawmakers. However, the members of the Senate are also members of Congress and are lawmakers. While they are lawmakers, they are not Representatives because they do not belong to the House of Representatives.
So, these terms can be interchangeable. However, there can also be a difference if you are using the term “Representative” to refer specifically to a member of the House of Representatives.