Recently, Bitcoin fees have increased significantly, and because many beginners want to confirm their transaction and do not know how to calculate fees, so they pay more fees. In this case, a user paid 648 sat / Vbyte, and after a few minutes he discovered that the transaction had not been confirmed, so he increased it to 1116 sat, then 1,293, then increasing it to 1,585, then finally confirming it with 7,895 sat/Vbyte. Thus, instead of paying $30 to confirm the transaction, he paid $367.

So, how will we pay the ideal fees according to the situation, meaning that we do not pay a lot of fees and that they are not less than what is required, which causes a delay in confirmation?
First, we need to know the types of addresses. In Bitcoin, we have the following addresses:
- Legacy addresses: starts from 1
- Nested Segwit addresses: starts from 3 (but not all addresses that start with 3 are Segwit)
- Native Segwit addresses: starts from bc1q
- taproot addresses: starts from bc1p
Now that we know the type of addresses, we need to calculate the input and output virtual size, which we can calculate easily through
https://bitcoinops.org/en/tools/calc-size/Now suppose that I have a Segwit type transaction that contains 1 input and 2 outputs, the total size becomes: 140.5 vbytes.

After you know the size of your transaction, you need to go to
https://mempool.space and choose the appropriate fees according to Low Priority Medium Priority High Priority
Suppose I want my transaction to be confirmed quickly, so I choose 42 sat/vB
total fees will be 140.5 * 42 = 0.00005901 BTC which is $2.71
If your wallet recommends higher fees to you, you will most likely pay a higher fee than what is required to be confirmed.You can go to the two sites above and modify the transaction according to its type and the appropriate fees at that time.
Many thanks
https://bitcointalk.org/index.php?topic=5478485.msg63347819#msg63347819