Or should I build the city right next to it? It seems like the districts would be the ones to get the bonus from being next to a natural wonder but I wanted to verify
Most Natural Wonders provide bonuses or improve tiles surrounding them. With that in mind, it's likely best to leave spaces between them and your city as to work tiles and get those bonuses they are providing (+Science, Food or whatever).
Ones that just provide singular bonuses on the wonder tile themselves, or ones that give bonuses for moving units adjacent won't really be hurt by your city being right next to it.
Since districts don't get worked like normal tiles, building a district or wonder next to it would negate the bonuses they are providing to the tile.
However the one exception is:
"Natural Wonders also give an adjacency bonus to Holy Site Districts in which all adjacent tiles receive +2 Appeal."