Help on understanding some Arduino Nano code

Hello, I am working on a project of finding distance using an ultrasonic transceiver. In regards to the same, I found a website having the same project which i am working with. The link is as follows: Homemade ultrasonic distance sensor Arduino
But the problem is that it has done the project with arduino nano, but i want to use arduino uno, and i cannot understand certain parts of the code of arduino nano. The code is as mentioned in this link: Part list Homemade ultrasonic distance sensor. Ill paste it here just in case-

/* Ultrasonic distance sensor code by ELECTRONOOBS 26/07/2018

//Variables
bool triggered = false;
bool Trig_in_state = false;

void setup() {

DDRD |= B00111000; // Sets D3, D4, D5 outputs
DDRB |= B00000100; // Sets D10 as output

PCICR |= (1 << PCIE0); //enable PCMSK0 scan
PCMSK0 |= (1 << PCINT0); //Set pin D8 (trigger pin) set to fire interrupt on state change.
PCMSK0 |= (1 << PCINT1); //Set pin D9 (echo in) set to fire an interrupt on state change.

}

void loop() {
if(triggered)//Burst code starts...
{
delayMicroseconds(150);
/*We have seen a delay of 250uS when we've made tests
between the 10us trig pulse and the 8 cycles burt. For some reasons, if I put 250us delay,
I get 350 on the oscilloscope. That's why I've made a 150us delay.
*/
PORTD &= B11011111; //D5 LOW //Activate the MAX323 PNP transistor for supply

PORTD |= B00001000; //D3 HIGH
PORTD &= B11101111; //D4 LOW
delayMicroseconds(12);//12us so around 40KHz. Freq = 1/2*12us
PORTD &= B11110111; //D3 LOW
PORTD |= B00010000; //D4 HIGH
delayMicroseconds(12);
//We do this 8 times...
PORTD |= B00001000; //D3 HIGH
PORTD &= B11101111; //D4 LOW
delayMicroseconds(12);
PORTD &= B11110111; //D3 LOW
PORTD |= B00010000; //D4 HIGH
delayMicroseconds(12);

PORTD |= B00001000; //D3 HIGH
PORTD &= B11101111; //D4 LOW
delayMicroseconds(12);
PORTD &= B11110111; //D3 LOW
PORTD |= B00010000; //D4 HIGH
delayMicroseconds(12);

PORTD |= B00001000; //D3 HIGH
PORTD &= B11101111; //D4 LOW
delayMicroseconds(12);
PORTD &= B11110111; //D3 LOW
PORTD |= B00010000; //D4 HIGH
delayMicroseconds(12);

PORTD |= B00001000; //D3 HIGH
PORTD &= B11101111; //D4 LOW
delayMicroseconds(12);
PORTD &= B11110111; //D3 LOW
PORTD |= B00010000; //D4 HIGH
delayMicroseconds(12);

PORTD |= B00001000; //D3 HIGH
PORTD &= B11101111; //D4 LOW
delayMicroseconds(12);
PORTD &= B11110111; //D3 LOW
PORTD |= B00010000; //D4 HIGH
delayMicroseconds(12);

PORTD |= B00001000; //D3 HIGH
PORTD &= B11101111; //D4 LOW
delayMicroseconds(12);
PORTD &= B11110111; //D3 LOW
PORTD |= B00010000; //D4 HIGH
delayMicroseconds(12);

PORTD |= B00001000; //D3 HIGH
PORTD &= B11101111; //D4 LOW
delayMicroseconds(12);

PORTD &= B11000111; //D3, D4, D5 LOW //We have finished the burst. We set everything to low

PORTB |= B00000100;
/Rember, after the 8 cycles, the echo out pin, D10, is set
to high till we receive the bounced echo signal.
/
triggered = false; //Reset the triggered value
}
}

ISR(PCINT0_vect){
//If digital D8 is high -> trigger was activated
if(PINB & B00000001){
Trig_in_state = true; //Set the Trig_in_state to true since we've detected the trigger pulse
}
//If trigger pin is low, the 10us pulse is over and we start the code
else if(Trig_in_state)
{
triggered = true; //Set trigered state to true
Trig_in_state = false; //Reset the D8 pin state
}

/*After the 8cycle burst each time there will be an interruption, that could be made by D8 or D9
since those are the only 2 pins set as interrupt active
So, since D8(trigger) is already low till next measurement, only D9 (echo in) could fire the interruption
So, when we detect that, we set the echo out pin to low (D10) and end the echo pulse
IMPORTANT: A better way to do this, is to also measure the echo in frequency to make sure
it is around 40KHz, but I haven't done that. Works like this as well.
*/
PORTB &= 11111011; //D10, echo pin out to LOW
}

Okay, so specifically i have a brief idea of the code, and i researched on the internet a bit. I found out about initializing the the interrupts.

Please can you explain what the ISR(PCINT0_vect) function do? Also please can you explain in brief how i could write the code on arduino uno?

Please can you explain what the ISR(PCINT0_vect) function do?

It's an interrupt service routine for the pin-change interrupt.

Also please can you explain in brief how i could write the code on arduino uno?

That is Arduino code.

Please remember to use code tags when posting code.

Edit: Very similar topic here

The code you are looking at is not at all Arduino friendly, as it uses a lot of direct port manipulation. ISR(PCINT0_vect) comes from the AVR Standard Library, which is part of the toolchain for AVR-GCC, which is part of the Arduino IDE. ISR() is a way of declaring an interrupt service routine, or code to run when triggered by an interrupt. PCINT0_vect is the trigger to run the code, in this case, physical pin 4, PD2, Arduino pin number "2", PCINT0 etc... In the Arduino language, this would be done by attachInterrupt(). All that aside, code for the NANO should be directly compatible with code for the UNO, since they both use the same microcontroller.

The Nano and the Uno usr the same processor, so the code is compatible. The only difference is that the Nano has two additional analog-only input-only pins.

As it does not look like the sketch uses those extra pins, there should not be a problem running it on the Uno.

Do you have 10k pulldown resistors from the input pins (D8, D9) to GND?