In most countries, yes, foreigners can open accounts, but how easily depends on your residency status. Once you hold a residence permit or long-term visa, mainstream banks will generally take you, though some are noticeably more newcomer-friendly than others. Tourists and short-term visitors have a much harder time; many banks simply will not open accounts without proof of residence, and that is normal, not personal.
Where newcomers hit friction is the paperwork chain: no address proof yet, no local credit history, no tax number. The fix is usually persistence and choosing the right bank. Banks near universities and in immigrant-heavy neighborhoods deal with these situations daily and know the workarounds. Digital banks are another lifeline, since several operate across borders and accept customers with minimal documentation, giving you a working card and account while you sort out a traditional one.
If one bank says no, try another before panicking. Policies genuinely differ, and community groups can usually tell you which local banks are easiest for people on your visa type.