The LCCN is different from an ISBN. While an ISBN is required on every book printed, an LCCN is optional. An ISBN is similar to a person’s social security number and is its global identification number; the LCCN is primarily used by libraries. If you ever hope to have a library carry your book, you need one.
You must be an author or publisher to use the government website to obtain a “pre-published” LCCN. Open an account and fill out the form and submit it. There is no cost. You will get an email confirming your submission and then an LCCN number will be sent to you. After you physically publish your book, you will need to print out a copy of the email and enclose it with one copy of your book and mail to the Library of Congress.
https://www.loc.gov/programs/preassigned-control-number/about-this-program
The LCCN should be printed on the front pages along with the copyright and ISBN. Not so long ago it only took about 24-48 hours to receive an LCCN by email. Now it may take a month or more so plan accordingly.