Hi there,
not out of the box but there is a way more powerful solution.
With "tasker" you can virtually setup and configure everything. I use it (among other things) for exactly this.
I do travel a lot and i use public WiFi quite often, but I do not trust them, of course.
So, once i connect to a WIFI !=network1 and !=network2 and !=network3 --> Tasker starts VPN (wireguard to my home router in my case). if i connect to a well known (and conffigured (like e.g. network1) WiFi I do not connect VPN.
IF you follow that approach: keep in mind, taht some public as well as some corporate networks request you to sign in or enter a sting/pw/whatsoever. A automatic VPN activation would prevent such an interaction with a WiFi portal.
hope that helps