Hello there tomc12345,
I understand you've got an iPhone XS Max that won't connect to Wi-Fi or cellular data, right? Check out the following information to see if this helps to clear up what is occurring.
To get started, let's confirm cellular data still allows access to the desired apps so we can rule this out as being a possibility of what may be occurring. For assistance with checking this list, take a look at the section labeled "Set cellular data use for apps and services" of the following resource:
View or change cellular data settings on iPhone
Once you confirm that apps are set to allow cellular data access, let's check out the Wi-Fi settings. Let's forget the Wi-Fi network connection to establish a new one again. If you receive an error message while trying to connect, be sure to reply with what the message states. If you need assistance with connecting to the Wi-Fi network, check out the following resource:
If your iPhone, iPad, or iPod touch won't connect to a Wi-Fi network
If establishing a new connection and adjusting settings do not clear this up, Contact Apple Support to look into this in more detail.
Have a great day!