Welcome to the community
I suggest having a look at: Create an NFT and deploy to a public testnet, using Truffle (if you haven't already).
_safeMint
is an internal function.
You can create your own function to call this.
You can create your own mint
function to pass in the tokenId
that you want to use.
The ERC721PresetMinterPauserAutoId is opinionated. The token ID will be automatically generated which reduces the cost of minting. See:
You could extend ERC721 to create your own token and define a mint
with the functionality that you require (calling the internal _mint
function and then _setTokenURI
)