There was an update earlier this year that delivered some functionality behind what you want to do. Pages and Modules now have the ability to be assigned to students. For modules, this is an option in the 3-dot menu of the module title. For pages, this is an option in the top right next to the Publish option.
I have not tested to see how this works myself, but you can try that to see if that addresses your need.
If not, there is some info from @KristinL from an old post years ago: https://community.canvaslms.com/t5/Canvas-Question-Forum/Show-Hide-course-content-e-g-Files-Pages-by... . There were some potential workarounds she mentioned that might still work.
The default is that when you publish content for one group, everyone can see it. That means students can see the assignments in advance. I believe they can see assessments too, but it requires them to start the assessment, which will get logged, in order to see content.