This command will disregard any parent folders you may have inadvertently added.
Tagged Tar
Compress in Tar with XZ algorithm on macOS
Simply replace two bracketed items and run the command, and you are good to go. FYI, Terminal will not give you any visual progress bars. So unless you are absolutely certain compressing has come to a grinding halt, just give it some time. Xz is notoriously slower compared to gz, but it comes with higher compression rate. Try different methods for different purposes.