javascriptcoregtk4.0 is a JavaScript engine used by WebKitGTK, which is a web rendering engine for GTK applications.
In other words, it’s used by GTK applications that display some kind of web-based content. Many apps nowadays use web technologies to display parts of their UI or content, even if it doesn’t look like a web browser.
You can follow the trail of dependencies on your system, using some dnf commands. Here’s what it looks like on my system:
This shows that javascriptcoregtk4.0 is used by webkit2gtk4.0, which is in turn used by Atril (PDF/document viewer) and Lutris (game manager). You might have the same or different programs that depend on javascriptcoregtk4.0.
If you try to remove it, dnf will tell you what other packages will be removed. Whether it’s “safe” or not depends on if you want those other packages.
If you’re not sure, you can post the full output of the remove command here.