BIP173 specifies the conversion from Bech32 segwit addresses to scriptPubKey. You probably want to use some reference software to do the decoding (there are several links in the BIP). If you need the details, it is approximately:
- Split the address in a "human readable part" and a "data part"; the last '1' character in the address separates the two.
- Convert the data part from characters to symbols (integers in range 0-31) using the character map in the BIP.
- Verify the checksum (last 6 characters of the data part). I'll refer to the BIP for the details.
- Interpret the symbols of the data part as follows:
- One symbol: Witness version (number 0-16)
- Variable number of symbol: witness program
- The last 6 symbols: the checksum
- Perform various sanity checks on the data sizes and ranges, also illustrated in the BIP.
The retrieved information (witness version and program) can the be converted to a scriptPubKey, as specified in BIP141. Namely, OP_n (where n is the witness version), followed by a push of the witness program. Note that OP_0 is 0x00, while OP_1-OP_16 are 0x51..0x60.
There is a proposed amendment called BIP350 which improves the checksum for witness versions higher than 0 (which are currently not in use, but may become in use following the activation of Taproot (BIP340-342).
This is how conversion from addresses to scriptPubKeys works for all transaction outputs, FWIW. It is entirely unrelated to coinbases.
Disclaimer: I'm a co-author of all the BIPs mentioned in this answer.