You can go to Preferences -> Build, Execution, Deployment -> Build Tools -> Maven -> Importing and check the box that says Import Maven projects automatically.
In Mac, you can do Command + Shift + A, then enter the action reimport, then click on Reimport all Maven projects.
You can go to Preferences -> Build, Execution, Deployment -> Build Tools -> Maven -> Importing and check the box that says Import Maven projects automatically.
In Mac, you can do Command + Shift + A, then enter the action reimport, then click on Reimport all Maven projects.
As mentioned by @maheeka in the question's comments, if the project is a Maven project, the simplest way to achieve updating changed external libraries is to right-click on the project, and select Maven > Reload project.
You can actually see IntelliJ re-indexing the changed libraries individually during the operation in the bottom right status bar.
Tested on v2021.1 Ultimate.
Maven > Lifecycle > clean
Open the Maven Projects panel. Click lower-left corner for pop-up menu if that panel is not already visible.
In that panel, open the Lifecycle item. There you will find clean and install items for you to run.

As commented, you can also invoke this by command-line/console. But if already using IntelliJ, I do not see the point. Just show/hide this pane as you work. I use it countless times a day to hit install to build complete app, and hit clean whenever I suspect not all of the project is up-to-date in the build-results.
Build > Rebuild Project
If you are having weird problems in running the app in development also try the menu item Build > Rebuild Project.
I have asked what is the difference between a Build > Rebuild Project versus doing a Maven clean. But I still do not understand the precise details. So when things seem wonky, I do both to right the ship.
Tips:
- Restarting IntelliJ may help when behavior seems odd.
- Keep Intellij updated.
The answer here with the most votes suggests running the clean and install Lifecycle items separately in IntelliJ, which is easy enough and works. But it’s worth mentioning that you can combine these steps (and/or others) by instead creating a new Run/Debug Configuration of type maven and adding the command clean install (or whichever combination of maven lifecycle methods you run on a recurring basis).
Thereafter, running a mvn clean install is as simple as clicking the green button to run that Run/Debug Configuration.

When you made the change to pom.xml, a popup probably would have appeared at the bottom-right of the IDE saying:
Maven projects need to be imported
Import Changes Enable Auto-Import
If you click 'Import Changes', you should find that IntelliJ reloads the POM file and removes the dependencies that you've deleted.
Assuming you no longer have that popup on the screen, you can achieve the same thing by opening the 'Maven' tab on the right-hand side of the screen and clicking the 'Reimport All Maven Projects' button (looks like a refresh button with two arrows in a circle).

You can also have IntelliJ do this for you automatically. If the popup mentioned above is still open, simply click 'Enable Auto-Import', otherwise open the settings and navigate to:
Build, Execution, Deployment > Build Tools > Maven > Importing
then select the option "Import Maven projects automatically".
It is probably because it is loading the jar files from the cache location. You can clear that clicking on Reload All Maven Projects button present on the right hand section of screen, under Maven as shown in this screenshot.
Once it is done, rerun your project. It should work as expected.