I'm trying to test P2TR with Bitcoin Core, and I don't know how to get taproot addresses.
How should I create them using 22.0?
This functionality in the Bitcoin Core wallet has deliberately not been merged pre activation to prevent users from easily generating and giving out Taproot addresses prior to the Taproot rules being enforced.
You can get around this by importing a Taproot descriptor into the wallet prior to this PR being merged as described here, here, here or here but that does require you to generate a private, public key pair outside of the Core wallet (or use an existing test vector but don't send to this on mainnet). Unless you know what you are doing I would wait until the Core wallet supports easy generation of Taproot addresses with e.g. the
getnewaddress RPC for mainnet Taproot address generation.