To cite an unpublished master's thesis or doctoral dissertation in APA 7, you need to include the author, year, title, unpublished dissertation in brackets, and institution. This will look like:
Author, B. B. (Year). Work title [Unpublished doctoral dissertation]. Institution.