You can only create a user with a password in a contained database

In SQL Server 2017, I found that my initial setup did not configure the "contained databases" feature to help this along.

so, at server level you can check the server properties in the UI or run:

EXEC sp_configure 'CONTAINED DATABASE AUTHENTICATION'

if the running value isn't 1, then:

EXEC sp_configure 'CONTAINED DATABASE AUTHENTICATION', 1
GO
RECONFIGURE
GO

At the database level, it also might not have the "contained database" feature fully enabled. The option sits in the Database Properties panel on the Options section, the fourth dropdown at the top...

Containment type == None or Partial

You can set it via SQL too. eg:

USE [master]
GO
ALTER DATABASE [MyDb] SET CONTAINMENT = PARTIAL
GO

thereafter, you can create the contained user as suggested by @aleksandr

USE [MyDb]
GO
CREATE USER MyUser WITH PASSWORD = 'pass@123';
GO

Create the login and the user separately:

CREATE LOGIN MyUser WITH PASSWORD = 'pass@123';
CREATE USER MyUser FOR LOGIN MyUser;  

The names can be the same but of course they can also be different.