Packages have a manifest file (Package.swift) at the top of the package. This file lists what Products the package offers to other Swift code. If you made the package in the default way (either via the New > Package… menu item in Xcode, or via swift package init in the terminal then your package will have a predefined single Library product whose name matches the name of the Package (in your case Vehicles.) In order to build that product, SwiftPM has a build target (also named Vehicles.)
So, your package already offers a Swift Library named Vehicles and that library is built by SwiftPM using the Vehicles.swift source file. Thus removing that file causes an error.
I would say that it's fine to leave Vehicles.swift empty and define all your library's types in other source files in the /Sources/Vehicles/ folder (source files in this folder will be compiled into the Vehicles Library module.) How you organise the source code in this folder is up to you.
Just to be clear, SwiftPM definitely does not require to have a source file with the same basename as the target/directory name.
If you don’t want/need the file Vehicles.swift, it's absolutely fine to delete it.
The only requirement is that every target (except system or executable targets, I believe) must have at least one source file. So you will get an error if you create a new package and then delete the lone Vehicle.swift from the Vehicles target. But that error will go away as soon as you create one or more other .swift files in that directory, as it seems you have done @somu. (Note that SwiftPM expects the source files to be in the target's directory, e.g. under Sources/Vehicles. It's not clear from your original post if you have put them there.)
@somu Please provide more information about your package so we can help you:
What's the full directory structure of your package?
What compilation error (exact error message) are you seeing?