Gov. Lawrence J. Hogan Jr. (R) enacted legislation to ban the sale and possession of ghost guns on Friday morning, while also imploring lawmakers to take action on his stalled crime-fighting bills.