Can someone tell me the difference please?
Have a look at the following two sentences.
近くに brings the location (of the mountain) into focus, and it's far more common than 近くで.
近くで shifts the focus to the activity (of enjoying the view).
Tofugu has an article that dives into the contrast between に and で. https://www.tofugu.com/japanese/ni-vs-de/