Changing analogWrite() function frequency

The Nano Every is the same foot print as the 328 Nano but has many additional useful features as it uses the Atmega 4809 as the processor.

MegaCoreX is the best platform to use with the Nano Every, and it contains a function
analogWriteFrequency( ) which will work for 1(default), 4, 8, 16, or 32 KHz.

What you need to know can be found at

Instructions on how to load the core through the board manager is here