The WiFi variable is a global object. Just #include <WiFiNINA.h> in the required file and you don't need to pass anything.