A Mac has no /etc/passwd that tells the real story about local users. The account data sits in Directory Services, and dscl reads it.
The dot means the local directory. Ask for your own record and only the attributes you care about:
dscl . -read /Users/$USER NFSHomeDirectory UserShell UniqueID
You get your home folder, your login shell and your numeric user ID. The first account on a Mac usually has ID 501, which is also the number you see in file listings with ls -n.
Leave the attribute names off and you get the whole record, which is long. To see all local accounts, including the many hidden system accounts whose names start with an underscore:
dscl . -list /Users UniqueID
I’d reach for it when a shell change didn’t seem to stick, or to check a user’s ID before setting up file sharing with a NAS, where matching IDs avoid permission trouble.
Stick to -read and -list unless you know what you’re doing. dscl can also create, change and delete records, and with sudo it will happily edit an account in a way that locks it out. For normal changes, such as a new login shell, use chsh or the Users & Groups settings.
Further reading: dscl.1 man page