With Google Search Console you want to either verify a property at the domain level, which means all url prefix variants like www and http/https are included, or verify all url prefix variants separately.
Serving content on different url prefixes is not advised, pick one and have all the others redirect to it.
With Google Analytics url prefix does not matter. It tracks based on where the tracking code is placed. If it's on all url prefix variants, it tracks all.
However, if you want to link your Google Analytics to the Google Search Console, you can't do it via the domain level (Last I checked). You have to pick one url prefix variant and link to that.