Looks like we need more information: please specify the Mac model you are attempting to install Windows on, and the version of macOS you are starting from:
2012-2014 models: Catalina (10.15)
2015 models: Monterey (12)
2016-2018 models: Ventura (13)
2018-2020 models: Sequoia (15)
2020 and later Pro models with Intel, including MacBook Pro, iMac, and Mac Pro: Tahoe (26)
Earlier models aren't natively supported by Windows 10 drivers. Having the latest possible macOS, however, also applies known upgrades to the built-in components, If you're not 100% sure where you stand, run Software Update from System Preferences/Settings until your Mac says it's up-to-date, Then and only then can you try Boot Camp again.
You'll need Windows 10 version 22H2. No earlier versions are supported by Microsoft, even if a Mac would accept an earlier build. Get a full 64-bit ISO image from Microsoft, or use a spare PC to get a Media Creation Tool and generate an ISO to copy into your Mac.
Copy the image you got to a place you can easily find it on the Mac. Then, run Boot Camp Assistant again and follow all onscreen instructions. If you're still stuck, please post again with the exact error message and the steps you took to get there.
--Nate