The police can’t track what you are doing when connected to a VPN. However, they can get a court order to access the VPN servers you are using. To prevent them from tracking you, always go for a publicly-audited no-log VPN.