My nephew, David, is a lawyer. would be the proper way to punctuate this sentence.
In the sentence "My nephew David is a lawyer," the use of a comma is not necessary. You have correctly used the possessive form "my nephew David" to indicate that David is your nephew, and the sentence flows smoothly without a comma. Commas are typically used to separate elements in a sentence, such as listing multiple items, introducing additional information, or indicating a pause. In this case, since there is no need for additional information or a pause, omitting the comma is appropriate.