If I have one Nintendo Switch and two Nintendo Accounts, and I buy something using one account for a game using in-game credits will it put the credits on both accounts?
No, it will not charge your other accounts. I am assuming that you are talking about the Nintendo Gold Points. If you want to buy a game using Nintendo Gold Points, then head over to the account that you want to buy the game with, and buy it. Your other account will still be able to play it, though.