Raspberry Pi 4B has some configurations to do for you to get it fully configured.  I use the gigabit ethernet port instead of wireless (wifi).   My EE Lab has its own gigabit CAT 6 connection and switch. If you need wifi configuration, I will find the notes for you later on. RPi is short name for Raspberry Pi

Here is my RPi and the T-Cobbler.  The T-Cobbler help with building circuits.  It is labelled for each pin.   I have my normal test circuit installed.  An LED and 330 Ω resistor connected to GPIO 18.  RPi is a 3.3V device not 5V.   I stay with the 3.3V configuration on it. 

1.) Base installation of Raspberry Pi latest operating system

RPi-Imager to burn the SD card
https://www.raspberrypi.com/software/

Follow the documentation for your workstation (computer) operating system to install the RPI-Imager software.  You will need to use the USB dongle to burn the SD card.

2.) Raspi-Config:   You need to turn on several features that are off by default

Click on interfaces.  I turn on SSH, I2C, 1-Wire, and Remote GPIO.   I have a section on using I2C to connect all my devices together.

Configure I2C:

sudo chown :i2c /dev/i2c-1 (or i2c-0)
sudo chmod g+rw /dev/i2c-1
sudo usermod -aG i2c <username>

3.) Configure xRDP so you can use Windows 11 RDP to connect to your Raspberry Pi

Sudo apt update
Sudo apt xrdp

RPi security doesn’t allow your user to RDP.  You have to create a new user for RDP.

sudo adduser <name>

You can add them to Sudoers to make them a root user by default.

Reboot

4.) Fix Thonny so you can build circuits. 

Thonny is your configuration tool like  Arduino IDE.  You want to use the GPIO pins on your RPi

sudo adduser <user> gpio

Reboot

5.)  Install VIM to edit files.  You can use nano or other tools.  I like VIM for my text editor.

Sudo apt install vim

6.) Install latest kernel

This replaces the base kernel 6.1.0-v8+ with 6.6.5-v8+.   Kernel 6.6.5 is the latest LTS (long term service kernel).

Sudo apt update
Sudo apt full-upgrade

7.) Testing the GPIO

import RPi.GPIO as GPIO
import time

def destroy(): 
    GPIO.cleanup()
    

def setup():
    while True:
        GPIO.setwarnings(False)
        GPIO.setmode(GPIO.BCM)
        # GPIO.setmode(GPIO.BOARD)
        red = 18
        GPIO.setup(red,GPIO.OUT)
        GPIO.output(red,1)
        time.sleep(1)
        GPIO.output(red,0)
        time.sleep(1)
            

def loop():
    print("")


if __name__ == '__main__':
    print ('Program is starting...' )
    setup() 
    try:
        loop()  
    except KeyboardInterrupt:
        destroy()   

sudo i2cdetect -y 1 from RPi

24-27 are I2C LCD screens
50 is the Arduino Mega 2560