I am trying to use TextInputLayout in my Login form and have been trying to make it look like this

But instead it looks like this

I have already tried to fix the margin, and every thing, I have tried looking in YouTube for other projects where people used this syntax, but none face the problem I face, This is the code for the xml.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".SignUp">
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Sign Up"
android:textStyle="bold"
android:textSize="25dp"
android:layout_margin="20dp"
/>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="60dp"
app:boxBackgroundColor="@color/white"
app:boxCollapsedPaddingTop="25dp"
app:startIconDrawable="@drawable/baseline_person_24"
android:layout_marginStart="30dp"
android:layout_marginEnd="30dp">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Name"
/>
</com.google.android.material.textfield.TextInputLayout>
<Button
android:id="@+id/button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="Button" />
</LinearLayout>
Finally, the problem has been resolved, what I did was
after setting up everything, I created a new project to check if the problem was still there, but everything was working well!
I inspected the projects I made earlier, and found that the problem was still there and upon comparing the build.gradle of both the projects I found that there were few differences between their dependencies, so I copied those from the new project to the old one and its been working fine since then.
My build.gradle(Project)
My build.gradle(module)
My settings.gradle
Thanks @AbhishekTiwari for helping me out!