To expand a little, the gitignore is relative to it, your .gitignore has
# Binary Files
Binaries/*
Plugins/*/Binaries/*
# Builds
Build/*
# etc...
Which is not going match
5.1.0/Udemy_UnrealEngine5C++Developer/01_Intro-and-Setup/IntroProject/Binaries
5.1.0/Udemy_UnrealEngine5C++Developer/01_Intro-and-Setup/IntroProject/Build
It would have worked correctly if you put the .gitignore in “Unreal/5.1.0/Udemy_UnrealEngine5C++Developer/01_Intro-and-Setup/IntroProject”
Brian’s suggestion is to add a leading** which says to match in all directories. From the docs:

- Git - gitignore Documentation