Correct way is to treat "www." as silent and not even say it or type it. Then if a URL doesn't support non-www URLs, don't do business with them.
Extra credit: block www.* on you pi-hole or other DNS filter so you avoid those sites that force-redirect domain.com to www.domain.com.