Hi iTBotb
Keyboard characters are created in the keyboard and sent to the Mac as a binary code "packets".
All keyboards generate a standard set of ASCII character codes and you state that any keyboard connected to your Mac fails to generate a lower case "b" but the same keyboard connected to a different computer does generate the lower case "b", therefore the keyboard is not to blame.
Most likely the keyboard map file in your Mac that converts the ASCII characters into computer code has become corrupted.
A quick test first:
Open Mac Preferences > Keyboard > Input Sources, enable "Show Input menu in menu bar", close preferences.
On the desktop menu ribbon click the newly added keyboard icon and from the drop-down menu click "Show keyboard viewer".
The compact-form virtual Mac keyboard will appear on the desktop.
On the real keyboard click the lower case "b" key, as you do so the same key in the virtual keyboard will change it's outline colour subtly, with the macOS dark-theme selected the key outline changes from mid-grey to pale-red.
When you press the lower case "b" does the outline colour change in the virtual keyboard?
Confirm that the other known-to-be-working keys on the real keyboard show up with changed colour outlines in the virtual keyboard as you press them
When you pressed the "b" key, if the outline changed from grey to red in the virtual keyboard then the macOS is seeing the "b" key ASCII code coming from the keyboard, if no then the keyboard driver or keyboard map is damaged.
Open TextEdit > File > New, to create a blank document.
Click with the mouse only the "b" key in the virtual keyboard, does the lower case "b" appear in the blank document?
If the "b" character is inserted correctly from the virtual keyboard then again this suggests that the keyboard driver or keyboard map is damaged, if no, then the problem is higher up in the macOS.
Two possible solutions.
Start the Mac in Safe-Mode, is the "b" key working as expected while in Safe-Mode?
Restart the Mac in Normal-Mode, is the "b" key now working correctly?
See this document for help with Safe-Mode:
https://support.apple.com/en-gb/HT201262
If the "b" key worked ok in Safe-Mode and continued to work ok after booting in Normal-Mode then the problem was repaired automatically during the Safe-Mode boot-up and can be marked as resolved.
If the "b" key did not work in Safe-Mode then the low-level keyboard driver that converts ASCII codes to computer code or the standard keyboard map itself is damaged.
In this case boot into Recovery-Mode and reinstall the OS.
See this document for help with Recovery Mode and reinstalling the OS:
https://support.apple.com/en-gb/HT201314
See this document for help with start-up key combinations for Intel and Apple Silicon Macs:
https://support.apple.com/en-gb/HT201255
HTH
Will.