Welcome to AndroidCentral
Hopefully we can get you sorted.
Are you using your Pixel XL in your home town?
There are some settings which turn off Mobile Data when you are "Roaming" (in a different country)
Have you changed the SIM card in the phone recently? or maybe switched Carriers?
The "normal" way i turn on my Mobile Data is to simply open the Settings Menu -> Data -> Then toggle the mobile data option.
Hopefully i was of some help here.
If you need additional help or have more questions or details to share, please join the site so you can reply in this thread. See
this link for instructions on how to join Android Central.