You don't need Internet to make 2 Arduino talk to each other, once they can connect to WiFi they can talk t each other. If you are using MKR WIFI 1010 (and/or other modules of course) you don't even need the router, once Arduino can be the server and the other once a client posting data.
Specifically for the MKR WIFI 1010, you can use it's built-in BLE capabilities to send/receive data.
If you decide on WIFI, check out WiFiNINA library and look for WiFiClient() and WiFiServer() classes and examples.