I don't use OneDrive, so I can't speak from personal experience.
The fact that your OneDrive may be 'linked' to your desktop, I think this is just a link to but not the actual file content - so my guess it wouldn't be scanning your OneDrive files as such.
Avast is an on-access antivirus, e.g. of you create, modify, open or run a file, OneNote or otherwise, it would be scanned at the time of creation/modification. So that may also depend on the file type (
https://learn.microsoft.com/en-us/openspecs/office_file_formats/ms-one/73d22548-a613-4350-8c23-07d15576be50 ), if considered susceptible to infection.
Even if you ran an on-demand scan on your OneDrive linked to your desktop PC, I think this more of a virtual drive. So I can't say if Avast would be able to scan your OneDrive, presumably there would be protection against access to your OneDrive. That said they should be scanned on creation/modification by the on-access scanners.