Renaming a Mac is different in Ventura (and other modern versions of the system, like Sonoma) from previous systems. Just follow these steps...
Choose System Settings from the Apple menu. Choose General settings, then About. Look for "Name" and click on the text to the right of it. Type a new computer name, then hit return when finished.