brandy078 Any app can detect which country you are in, if you have a SIM card plugged in into your phone, since Android permits all apps to obtain country of SIM card. Your configured timezone and language might also give this fact away. But only knowing in which country you are in is not a very accurate position.
WhatsApp however collects a lot of other metadata that might reveal more accurately where you are located, such as who you are chatting with. If WhatsApp knows the location of those you are chatting with, and multiple of them are located within a very small area, such as a single village or city area, or even a single neighborhood, they can probably deduce that you likely also reside in that village or neighborhood, as the small world theorem predicts that a person is mostly communicating with people close to them, for any distance metric, including physical distance.
It is also possible you maybe didn't always use a VPN for this specific WhatsApp account, so WhatsApp might already have learned at what precise locations, such as in which house, you are usually located.
It is also possible that you use other services that are tied to your WhatsApp account, such as if you have another Meta service registered on the same phone number, and you are giving away your location to that service. Facebook for example is notoriously infamous for trying to track where people are.
But no, they should not be able to track where you are as you move around, such as if you travel to another town, if you use a VPN, and block Location and Nearby Devices permissions from all Meta related apps you have.