Previously I managed to make a signature on Console of the Bitcoin Core using the Legacy Address, but when trying with the SegWit Address the following message appears:
Address does not refer to key (code -3)
Please explain and the solution.
Thanks.
There is no solution and you cannot sign a message with a segwit address. This has been the case since segwit was introduced. See