First make sure your plan includes roaming in Canada or Mexico.
Second make sure “Roaming data” is turned ON in your smartphone cellular settings.
Sometimes automatic mobile network selection doesn’t work properly. Please select manually the mobile network in your phone settings. Go to Settings -> Data cellular (or similar name).
In Canada select: Bell or Rogers.
In Mexico select: Movistar or Telcel.