What are exactly XTAL1 and XTAL2 pins in Arduino Uno/Nano?
The Crystal in Red is for the Atmega16U2 that manages the USB interface with its high speed connection to the PC (12 MHz for USB2 I think).

The Resonator in Yellow is for the Atmega328P.  It is less precise than the crystal oscillator.  

PB6 and PB7 are dedicated to the external crystal or resonator by the fuse settings used for Arduino. 

You can read more about the XTAL1, XTAL2 pins and the fuses from the device datasheet 

https://www.microchip.com/wwwproducts/en/ATMEGA328P

You can connect a crystal to the pins, but you will also need 22pF caps to connect from the pins to Gnd. And remove the resonator.  Current Uno layout does not really support making those connections.