Since the laptop works with an external display it sounds like the laptop has a bad display assembly that will need to be replaced. Have Apple or an Apple Authorized Service Provider examine the laptop and provide you with an estimate for the repair. If you bought an Apple refurbished unit directly from Apple perhaps you still have a warranty on it (I have no idea what the warranty period is for a refurbished laptop sold directly by Apple), otherwise expect an expensive repair (a display repair can start out from $460 US for a 13" model all the way to around $800 US for a newer 15" USB-C model). Apple or the AASP can provide you with a firm price quote.
If it is a MBPro 13" (2016) USB-C model, then see if it qualifies for this free Apple backlight repair program:
https://support.apple.com/13-inch-macbook-pro-display-backlight-service
FYI, here is a current list of the publicly acknowledged free repair programs for various Apple products (some products have multiple programs):
https://support.apple.com/service-programs