Xcode is Apple's software development application.
If you do not develop or compile software, use simulators, or have another specific reason to use it, you may not need to keep the full Xcode application installed.
Using Terminal does not, by itself, require Xcode.
However, some command-line tasks or applications may depend on Xcode or Apple's separate Command Line Tools.
You can check whether Xcode is currently selected as the active developer directory by entering this command in Terminal:
xcode-select --print-path
If the result is /Applications/Xcode.app/Contents/Developer, Xcode is currently selected. This does not, by itself, mean that you need to keep Xcode installed.
Based on the use you described, removing Xcode.app may be reasonable.
macOS itself should continue to operate normally, although a task or application that specifically depends on Xcode could be affected.
The separate Command Line Tools, if installed, are not necessarily removed when you delete Xcode.app.
Avoid deleting other files simply because their names contain “Xcode” or “Developer.” Identify them first.
In short, if you have no specific use for Xcode, removing Xcode.app while leaving other developer-related files alone initially is a cautious approach.